結果

問題 No.2085 Directed Complete Graph
ユーザー 259_Momone
提出日時 2022-09-27 01:02:39
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
RE  
実行時間 -
コード長 453 bytes
コンパイル時間 3,989 ms
コンパイル使用メモリ 253,188 KB
最終ジャッジ日時 2025-02-07 16:37:13
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8 RE * 7
権限があれば一括ダウンロードができます

ソースコード

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);
    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