No.522 Make Test Cases
レベル :
/ AI推定難易度 : 147
/ 実行時間制限 : 1ケース 2.000秒 / メモリ制限
: 512 MB / 標準ジャッジ問題
タグ : / 解いたユーザー数 298
作問者 :
butsurizuki
/ テスター :
👑
yumechi
タグ : / 解いたユーザー数 298
作問者 :
butsurizuki
/ テスター :
👑
問題文最終更新日: 2026-06-26 23:14:17
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 165
(順位表)
の他の問題:
Problem Statement
H has been asked to create test cases based on the following constraints.
$a+b+c = N$ and $a \le b \le c$ (where $a,b,c,N$ are positive integers)
Find all possible test cases,
- in ascending order of $a$,
- and, for equal $a$, in ascending order of $b$.
The output is large, so please use a fast output function or the like.
Input
$N$
The input consists of $N$ given on one line.
- Constraints
$3 \le N \le 3000$
Output
Output $a,b,c$ separated by spaces, with test cases separated by newlines.
A newline is required at the end of the output.
Sample
Sample 1
Input
3
Output
1 1 1
Sample 2
Input
10
Output
1 1 8 1 2 7 1 3 6 1 4 5 2 2 6 2 3 5 2 4 4 3 3 4
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。