F. Crunching Numbers Just for You

Codeforces
IDCF784F
Time2000ms
Memory64MB
Difficulty
implementation
English · Original
Chinese · Translation
Formal · Original
You are developing a new feature for the website which sells airline tickets: being able to sort tickets by price! You have already extracted the tickets' prices, so there's just the last step to be done... You are given an array of integers. Sort it in non-descending order. ## Input The input consists of a single line of space-separated integers. The first number is _n_ (1 ≤ _n_ ≤ 10) — the size of the array. The following _n_ numbers are the elements of the array (1 ≤ _a__i_ ≤ 100). ## Output Output space-separated elements of the sorted array. [samples] ## Note Remember, this is a very important feature, and you have to make sure the customers appreciate it!
你正在为一个销售机票的网站开发一项新功能:能够按价格对机票进行排序!你已经提取了机票的价格,现在只剩下最后一步要完成... 给你一个整数数组,请将其按非降序排序。 输入由一行空格分隔的整数组成。第一个数字是 #cf_span[n] (#cf_span[1 ≤ n ≤ 10]) —— 数组的大小。接下来的 #cf_span[n] 个数字是数组的元素(#cf_span[1 ≤ ai ≤ 100])。 请输出排序后数组的元素,元素之间用空格分隔。 记住,这是一个非常重要的功能,你必须确保客户能欣赏它! ## Input 输入由一行空格分隔的整数组成。第一个数字是 #cf_span[n] (#cf_span[1 ≤ n ≤ 10]) —— 数组的大小。接下来的 #cf_span[n] 个数字是数组的元素(#cf_span[1 ≤ ai ≤ 100])。 ## Output 请输出排序后数组的元素,元素之间用空格分隔。 [samples] ## Note 记住,这是一个非常重要的功能,你必须确保客户能欣赏它!
Given: - An integer $ n $, where $ 1 \leq n \leq 10 $, - An array $ A = [a_1, a_2, \dots, a_n] $, where each $ a_i \in \mathbb{Z} $ and $ 1 \leq a_i \leq 100 $. Objective: Sort $ A $ in non-descending order, i.e., produce a permutation $ B = [b_1, b_2, \dots, b_n] $ of $ A $ such that: $$ b_1 \leq b_2 \leq \dots \leq b_n $$ Output: The elements of $ B $, space-separated.
Samples
Input #1
3 3 1 2
Output #1
1 2 3
API Response (JSON)
{
  "problem": {
    "name": "F. Crunching Numbers Just for You",
    "description": {
      "content": "You are developing a new feature for the website which sells airline tickets: being able to sort tickets by price! You have already extracted the tickets' prices, so there's just the last step to be d",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 65536
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF784F"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are developing a new feature for the website which sells airline tickets: being able to sort tickets by price! You have already extracted the tickets' prices, so there's just the last step to be d...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "你正在为一个销售机票的网站开发一项新功能:能够按价格对机票进行排序!你已经提取了机票的价格,现在只剩下最后一步要完成...\n\n给你一个整数数组,请将其按非降序排序。\n\n输入由一行空格分隔的整数组成。第一个数字是 #cf_span[n] (#cf_span[1 ≤ n ≤ 10]) —— 数组的大小。接下来的 #cf_span[n] 个数字是数组的元素(#cf_span[1 ≤ ai ≤ 100])...",
      "is_translate": true,
      "language": "Chinese"
    },
    {
      "statement_type": "Markdown",
      "content": "Given:  \n- An integer $ n $, where $ 1 \\leq n \\leq 10 $,  \n- An array $ A = [a_1, a_2, \\dots, a_n] $, where each $ a_i \\in \\mathbb{Z} $ and $ 1 \\leq a_i \\leq 100 $.  \n\nObjective:  \nSort $ A $ in non-d...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments