結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー rapurasurapurasu
提出日時 2017-06-04 12:58:34
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 1,106 ms / 2,000 ms
コード長 491 bytes
コンパイル時間 1,296 ms
コンパイル使用メモリ 159,076 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-22 04:18:14
合計ジャッジ時間 5,991 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 9 ms
4,348 KB
testcase_01 AC 37 ms
4,348 KB
testcase_02 AC 28 ms
4,348 KB
testcase_03 AC 77 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 1 ms
4,348 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 4 ms
4,348 KB
testcase_09 AC 52 ms
4,348 KB
testcase_10 AC 1,106 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
typedef long long LL;
int N;
int main(){
    cin>>N;
    REP(i,N+1){
        if(i==0)continue;
        for(int j=i;j<N+1;j++){
            int a=N-i-j;
            if(a>=j){
               cout<<i<<" "<<j<<" "<<a<<endl;
            }
        }
    }
    return(0);
}
0