結果

問題 No.2085 Directed Complete Graph
ユーザー 259_Momone259_Momone
提出日時 2022-09-27 01:00:15
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 460 bytes
コンパイル時間 3,262 ms
コンパイル使用メモリ 265,580 KB
実行使用メモリ 24,492 KB
平均クエリ数 2467.94
最終ジャッジ日時 2023-08-24 03:22:30
合計ジャッジ時間 5,965 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
24,036 KB
testcase_01 AC 25 ms
23,976 KB
testcase_02 WA -
testcase_03 AC 161 ms
23,688 KB
testcase_04 WA -
testcase_05 AC 79 ms
23,844 KB
testcase_06 AC 85 ms
23,616 KB
testcase_07 AC 142 ms
23,664 KB
testcase_08 AC 112 ms
24,036 KB
testcase_09 AC 141 ms
24,048 KB
testcase_10 AC 149 ms
23,700 KB
testcase_11 AC 147 ms
24,336 KB
testcase_12 AC 147 ms
24,060 KB
testcase_13 AC 148 ms
24,072 KB
testcase_14 AC 150 ms
23,412 KB
testcase_15 AC 25 ms
23,628 KB
testcase_16 AC 24 ms
24,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/extc++.h>

int main() {
    using namespace std;
    unsigned long N;
    cin >> N;
    vector<unsigned long> A(N);
    iota(begin(A), end(A), 1);
    stable_sort(begin(A), end(A), [](auto i, auto j){
        cout << "? " << i << " " << j << endl;
        unsigned long x;
        cin >> x;
        return x;
    });
    cout << "!" << endl;
    cout << N - 1 << endl;
    for(const auto a : A)cout << a << " ";
    cout << endl;
    return 0;
}
0