結果

問題 No.522 Make Test Cases(テストケースを作る)
コンテスト
ユーザー hiyokko2
提出日時 2017-06-02 22:34:04
言語 C++11
(gcc 15.3.0 + boost 1.92.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 72 ms / 2,000 ms
+ 916µs
コード長 650 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 423 ms
コンパイル使用メモリ 94,244 KB
実行使用メモリ 9,740 KB
最終ジャッジ日時 2026-09-02 02:24:51
合計ジャッジ時間 2,205 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

//#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);
            }
        }
    }
}
0