QOJ.ac

QOJ

Limite de temps : 1.0 s Limite de mémoire : 256 MB Points totaux : 100 Hackable ✓

#12924. 不同的和

Statistiques

序列的子段和(subsum)是指该序列中一个或多个连续元素的和。

给定一个整数 $N$。你的任务是构造一个长度为 $N$ 的正整数序列,使得序列中的每个元素都不超过 $3 \cdot (N + 6)$,且该序列的所有 $N \cdot (N + 1)/2$ 个子段和互不相同。

输入格式

输入包含多组测试数据。 第一行包含一个整数 $T$,表示测试数据的组数($1 \le T \le 200$)。 接下来的 $T$ 行,每行包含一个整数 $N$,表示序列的长度($1 \le N \le 2000$)。

输出格式

对于每组测试数据,输出一行包含 $N$ 个由空格分隔的正整数,表示你构造的序列。 如果存在多种解,输出任意一种即可。

样例

样例输入 1

2
2
5

样例输出 1

1 2
1 2 4 8 16

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.