結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー nanophoto12
提出日時 2017-09-02 16:18:30
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 1,069 ms / 2,000 ms
コード長 884 bytes
コンパイル時間 942 ms
コンパイル使用メモリ 92,724 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-06 18:34:02
合計ジャッジ時間 4,080 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cmath>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <functional>
#include <queue>
#include <iostream>
#include <string.h>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <cstdint>
#include <climits>
#include <unordered_set>
#include <sstream>
#include <stack>

using namespace std;

typedef long long int ll;
typedef pair<ll,ll> pii;
typedef pair<double,ll> pdi;
typedef tuple<ll,ll,ll> t3;

using namespace std;

const ll mod = 1000000007;

int main()
{
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    vector<t3> v;
    for(int i = 1;i <= n/3;i++)
    {
        for(int j = i; j <= (n - i) / 2 + 1;j++)
        {
            int k = n - i - j;
            if(k < j)
            {
                break;
            }
            cout << i << " " << j << " " << k << endl;
        }
    }
    
    return 0;
}
0