結果

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

ソースコード

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