結果

問題 No.934 Explosive energy drink
ユーザー trineutron
提出日時 2020-02-25 00:57:37
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 603 bytes
コンパイル時間 2,101 ms
コンパイル使用メモリ 196,048 KB
最終ジャッジ日時 2025-01-09 02:07:49
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 22 TLE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    vector<int> ans;
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
        cout << "?";
        for (int j = 0; j < n; j++) {
            if (i == j) continue;
            cout << " " << j + 1;
        }
        cout << endl;
        int e;
        cin >> e;
        if (e == 0) ans.push_back(i + 1);
    }
    cout << ans.size() << endl;
    for (int i = 0; i < ans.size(); i++) {
        cout << ans.at(i);
        if (i == ans.size() - 1) {
            cout << endl;
        } else {
            cout << " ";
        }
    }
}
0