結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー amtgjwamtgjw
提出日時 2018-06-04 16:42:32
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 584 bytes
コンパイル時間 670 ms
コンパイル使用メモリ 63,720 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-12 22:11:06
合計ジャッジ時間 4,510 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 6 ms
4,376 KB
testcase_02 AC 5 ms
4,376 KB
testcase_03 AC 10 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 8 ms
4,376 KB
testcase_10 AC 133 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>

using namespace std;

#define REP(i,n)	for(int i=0;i<(n);++i)
#define REPS(i,s,t)	for(int i=(s);i<(t);++i)

#define INF 		2000000007
#define MINF		-200000007
#define MOD			1048576 	
// 2^20

#define MAX 		1000005

typedef unsigned int 			uint;
typedef unsigned long long int	ull;
typedef long long int 			ll;

//int dp[MAX];

int main(){
	int N;cin>>N;

	REPS(a,1,N/3+1){
		int b=a,c=N-a-b;
		while(b <= c){
			printf("%d %d %d\n",a,b,c);
			b++;c--;
		}
	}

	return 0;
}
0