結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー nanophoto12nanophoto12
提出日時 2017-09-02 16:18:30
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 1,070 ms / 2,000 ms
コード長 884 bytes
コンパイル時間 1,006 ms
コンパイル使用メモリ 92,836 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-24 10:54:03
合計ジャッジ時間 4,403 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

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