結果
| 問題 |
No.522 Make Test Cases(テストケースを作る)
|
| ユーザー |
hiyokko2
|
| 提出日時 | 2017-06-02 22:34:04 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 143 ms / 2,000 ms |
| コード長 | 650 bytes |
| コンパイル時間 | 772 ms |
| コンパイル使用メモリ | 77,708 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-22 02:04:44 |
| 合計ジャッジ時間 | 2,616 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
//#define LOCAL
#include <fstream>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <map>
#include <queue>
#include <cstring>
#include <climits>
//#define int long long
//typedef long long ll;
#define rep(i,n) for(int i=0; i<(n); i++)
#define MOD 1000000007
using namespace std;
signed main()
{
#ifdef LOCAL
ifstream in("input.txt");
cin.rdbuf(in.rdbuf());
#endif
int N;
cin >> N;
for (int a=1; a<=N-2; a++) {
for (int b=a; b<=N-a-1; b++) {
int c = N - a - b;
if (c >= b) {
printf("%d %d %d\n", a, b, c);
}
}
}
}
hiyokko2