結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー olpheolphe
提出日時 2017-06-02 22:22:54
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 1,027 ms / 2,000 ms
コード長 1,012 bytes
コンパイル時間 1,029 ms
コンパイル使用メモリ 111,260 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-21 23:41:33
合計ジャッジ時間 4,285 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "math.h"
#include "utility"
#include "string"
#include "map"
#include "unordered_map"
#include "iomanip"
#include "random"

using namespace std;
const long long int MOD = 1000000007;
list<long long int> Prime(int M) {
	list<long long int>P;
	P.push_back(2);
	P.push_back(3);
	for (int i = 5; i <= M; i += 6) {
		bool flag = true;
		for (auto j : P) {
			if (i%j == 0) {
				flag = false;
				break;
			}
		}
		if (flag)P.push_back(i);
		flag = true;
		for (auto j : P) {
			if ((i + 2) % j == 0) {
				flag = false;
				break;
			}
		}
		if (flag)P.push_back(i + 2);
	}
	return P;
}


long long int N;
long long int ans;
long long int H, W;



int main() {
	ios::sync_with_stdio(false);
	cin >> N;
	for (int i = 1; i <= N; i++) {
		for (int j = i; j <= N; j++) {
			if (j <= N - i - j)cout << i << " " << j << " " << N - i - j << endl;
		}
	}

	return 0;
}
0