結果

問題 No.397 NO MORE KADOMATSU
ユーザー yosupotyosupot
提出日時 2016-07-15 22:35:14
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 756 bytes
コンパイル時間 2,405 ms
コンパイル使用メモリ 97,272 KB
実行使用メモリ 24,360 KB
平均クエリ数 2433.17
最終ジャッジ日時 2023-09-23 11:02:55
合計ジャッジ時間 4,106 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 25 ms
24,264 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 55 ms
23,388 KB
testcase_10 AC 57 ms
24,336 KB
testcase_11 AC 56 ms
23,388 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 26 ms
23,664 KB
testcase_17 AC 26 ms
24,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <cassert>
#include <cstring>
#include <vector>
#include <valarray>
#include <array>
#include <queue>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <cmath>
#include <complex>
#include <random>

using namespace std;
using ll = long long;
using ull = unsigned long long;
constexpr int TEN(int n) {return (n==0)?1:10*TEN(n-1);}

int main() {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
        int d;
        cin >> d;
    }
    cout << n*(n-1)/2 << endl;
    for (int i = 0; i < n; i++) {
        for (int j = n-1; j-1 >= i; j--) {
            cout << j-1 << " " << j << endl;
        }
    }
    int d;
    cin >> d;
    return 0;
}
0