結果

問題 No.522 Make Test Cases(テストケースを作る)
コンテスト
ユーザー vjudge1
提出日時 2025-11-16 11:10:50
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 167 ms / 2,000 ms
コード長 426 bytes
コンパイル時間 1,768 ms
コンパイル使用メモリ 194,364 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-11-16 11:10:55
合計ジャッジ時間 4,773 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
signed main()
{

    // freopen("testcase.in", "r", stdin);
    // freopen("testcase.out", "w", stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n;
    cin >> n;
    for (int a = 1; a <= n - 2; a++)
        for (int b = a; 2 * b <= n - a; b++)
        {
            cout << a << " " << b << " " << n - a - b << "\n";
        }
}
0