結果

問題 No.934 Explosive energy drink
ユーザー cotton_fn_cotton_fn_
提出日時 2020-02-02 20:58:01
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 307 ms / 2,000 ms
コード長 915 bytes
コンパイル時間 1,026 ms
コンパイル使用メモリ 122,616 KB
実行使用メモリ 24,360 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 19:34:40
合計ジャッジ時間 5,595 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
23,616 KB
testcase_01 AC 299 ms
24,360 KB
testcase_02 AC 24 ms
23,508 KB
testcase_03 AC 152 ms
24,012 KB
testcase_04 AC 297 ms
24,252 KB
testcase_05 AC 24 ms
24,024 KB
testcase_06 AC 23 ms
23,328 KB
testcase_07 AC 23 ms
23,628 KB
testcase_08 AC 22 ms
23,652 KB
testcase_09 AC 24 ms
23,544 KB
testcase_10 AC 23 ms
23,400 KB
testcase_11 AC 23 ms
24,024 KB
testcase_12 AC 24 ms
23,844 KB
testcase_13 AC 28 ms
23,784 KB
testcase_14 AC 28 ms
23,592 KB
testcase_15 AC 102 ms
23,340 KB
testcase_16 AC 39 ms
23,340 KB
testcase_17 AC 58 ms
23,640 KB
testcase_18 AC 59 ms
23,616 KB
testcase_19 AC 117 ms
24,012 KB
testcase_20 AC 195 ms
24,000 KB
testcase_21 AC 216 ms
23,964 KB
testcase_22 AC 300 ms
23,664 KB
testcase_23 AC 307 ms
24,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <deque>
#include <queue>
#include <array>
#include <set>
#include <map>
#include <cmath>
#include <complex>
#include <algorithm>
#include <numeric>
#include <utility>
#include <tuple>
#include <functional>
#include <bitset>
#include <cstdint>
#include <cassert>
#include <random>

using namespace std;
using i64 = int64_t;
using i32 = int32_t;

int main() {
    int n;
    cin >> n;
    vector<int> res;
    for (int i = 1; i <= n; ++i) {
        cout << "? " << n - 1 << '\n';
        for (int j = 1; j <= n; ++j) {
            if (j == i) continue;
            cout << j << ' ';
        }
        cout << endl;
        char c;
        cin >> c;
        if (c == '0') {
            res.push_back(i);
        }
    }
    cout << "! " << res.size() << '\n';
    for (int x : res) cout << x << ' ';
    cout << endl;
    return 0;
}
0