結果

問題 No.934 Explosive energy drink
ユーザー tactac
提出日時 2019-11-29 22:35:34
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 317 ms / 2,000 ms
コード長 1,379 bytes
コンパイル時間 1,873 ms
コンパイル使用メモリ 164,404 KB
実行使用メモリ 24,204 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 18:51:12
合計ジャッジ時間 7,252 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
23,388 KB
testcase_01 AC 314 ms
23,508 KB
testcase_02 AC 27 ms
23,532 KB
testcase_03 AC 160 ms
23,496 KB
testcase_04 AC 317 ms
24,204 KB
testcase_05 AC 27 ms
23,724 KB
testcase_06 AC 26 ms
23,436 KB
testcase_07 AC 26 ms
24,096 KB
testcase_08 AC 27 ms
23,676 KB
testcase_09 AC 28 ms
23,448 KB
testcase_10 AC 28 ms
23,256 KB
testcase_11 AC 29 ms
23,304 KB
testcase_12 AC 31 ms
24,192 KB
testcase_13 AC 32 ms
23,712 KB
testcase_14 AC 32 ms
23,676 KB
testcase_15 AC 107 ms
24,156 KB
testcase_16 AC 47 ms
23,904 KB
testcase_17 AC 66 ms
23,532 KB
testcase_18 AC 65 ms
23,256 KB
testcase_19 AC 124 ms
23,508 KB
testcase_20 AC 208 ms
23,688 KB
testcase_21 AC 220 ms
23,868 KB
testcase_22 AC 311 ms
23,880 KB
testcase_23 AC 312 ms
23,532 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pii pair<int, int>
#define eb emplace_back
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep3(i, l, n) for (int i = l; i < (n); ++i)
#define sz(v) (int)v.size()
#define inf (int)(1e9+7)
#define INF (ll)(1e18)
#define abs(x) (x >= 0 ? x : -(x))
#define ceil(a, b) a / b + !!(a % b)
template<typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { if (a > b) { a = b; return 1; } return 0; }
template<typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { if (a < b) { a = b; return 1; } return 0; }
template<typename T> T gcd(T a, T b) { if (b == 0) return a; return gcd(b, a % b); }
template<typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; }







int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    
    
    int n;
    cin >> n;
    int table[1100] = {0};
    int k = 0;
    
    rep(i, n) {
        cout << "? " << n - 1 << endl;
        rep(j, n) {
            if (j == i) continue;
            cout << j + 1 << " ";
        }
        cout << endl;
        int ans;
        cin >> ans;
        if (ans == 0) {
            table[i + 1] = 1;
            ++k;
        }
    }
    
    cout << "! " << k << endl;
    rep3(i, 1, n + 1) if (table[i] == 1) cout << i << " ";
    cout << endl;
}
0