[语言月赛 202406] 朋友数列

Luogu
IDLGB3987
Time1000ms
Memory512MB
DifficultyP1
2024Special JudgeO2优化数组语言月赛
小 K 喜欢数列。设数列 $a,b$ 的长度均为 $n$,$a_i$ 表示数列 $a$ 中第 $i(1 \le i \le n)$ 个数字,$b_i$ 表示数列 $b$ 中第 $i(1 \le i\le n)$ 个数字。 如果对于所有的 $1 \le i \le n$,$a_i+b_i$ 的值均相同,并且满足 $-10^9 \le a_i,b_i \le 10^9$,则小 K 称它们是一对朋友数列。 现在,小 K 随手写下了 $n$ 和数列 $a$,小 K 希望你能帮助小 K 找到数列 $a$ 的一个朋友数列。 ## Input 输入共两行。 输入的第一行为一个整数 $n$。 输入的第二行为 $n$ 个整数,第 $i$ 个数为 $a_i$。 ## Output 输出一行 $n$ 个整数,表示数列 $a$ 的一个朋友数列。 **可能有多种符合题意的答案,你只需要输出任意一种即可。** [samples] ## Note ### 数据规模与约定 - 对于 $20\%$ 的测试数据,$n=1$; - 对于 $100\%$ 的测试数据,$1 \le n \le 10^5$,$|a_i| \le 10^9$。
Samples
Input #1
5
1 2 3 4 5
Output #1
5 4 3 2 1
API Response (JSON)
{
  "problem": {
    "name": "[语言月赛 202406] 朋友数列",
    "description": {
      "content": "小 K 喜欢数列。设数列 $a,b$ 的长度均为 $n$,$a_i$ 表示数列 $a$ 中第 $i(1 \\le i \\le n)$ 个数字,$b_i$ 表示数列 $b$ 中第 $i(1 \\le i\\le n)$ 个数字。 如果对于所有的 $1 \\le i \\le n$,$a_i+b_i$ 的值均相同,并且满足 $-10^9 \\le a_i,b_i \\le 10^9$,则小 K 称它们是一对朋友数",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 524288
    },
    "difficulty": {
      "LuoguStyle": "P1"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGB3987"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "小 K 喜欢数列。设数列 $a,b$ 的长度均为 $n$,$a_i$ 表示数列 $a$ 中第 $i(1 \\le i \\le n)$ 个数字,$b_i$ 表示数列 $b$ 中第 $i(1 \\le i\\le n)$ 个数字。\n\n如果对于所有的 $1 \\le i \\le n$,$a_i+b_i$ 的值均相同,并且满足 $-10^9 \\le a_i,b_i \\le 10^9$,则小 K 称它们是一对朋友数...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments