結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
24,072 KB
testcase_01 AC 22 ms
24,036 KB
testcase_02 WA -
testcase_03 AC 164 ms
23,544 KB
testcase_04 WA -
testcase_05 AC 82 ms
24,348 KB
testcase_06 AC 84 ms
23,544 KB
testcase_07 AC 141 ms
24,108 KB
testcase_08 AC 111 ms
24,012 KB
testcase_09 AC 146 ms
23,436 KB
testcase_10 AC 146 ms
23,544 KB
testcase_11 AC 149 ms
23,388 KB
testcase_12 AC 149 ms
23,640 KB
testcase_13 AC 150 ms
23,424 KB
testcase_14 AC 150 ms
23,964 KB
testcase_15 AC 24 ms
23,400 KB
testcase_16 AC 23 ms
24,372 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