結果

問題 No.934 Explosive energy drink
ユーザー uchiiiiuchiiii
提出日時 2020-07-21 00:59:22
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 312 ms / 2,000 ms
コード長 1,359 bytes
コンパイル時間 3,887 ms
コンパイル使用メモリ 217,976 KB
実行使用メモリ 24,408 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-24 03:56:24
合計ジャッジ時間 8,117 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
24,036 KB
testcase_01 AC 311 ms
23,376 KB
testcase_02 AC 26 ms
24,012 KB
testcase_03 AC 158 ms
24,012 KB
testcase_04 AC 312 ms
23,376 KB
testcase_05 AC 27 ms
24,048 KB
testcase_06 AC 26 ms
23,424 KB
testcase_07 AC 25 ms
23,640 KB
testcase_08 AC 25 ms
23,832 KB
testcase_09 AC 26 ms
23,424 KB
testcase_10 AC 26 ms
24,012 KB
testcase_11 AC 27 ms
23,868 KB
testcase_12 AC 29 ms
23,532 KB
testcase_13 AC 31 ms
24,408 KB
testcase_14 AC 32 ms
24,084 KB
testcase_15 AC 104 ms
23,580 KB
testcase_16 AC 42 ms
24,252 KB
testcase_17 AC 63 ms
24,024 KB
testcase_18 AC 64 ms
23,412 KB
testcase_19 AC 121 ms
23,388 KB
testcase_20 AC 202 ms
24,024 KB
testcase_21 AC 218 ms
23,580 KB
testcase_22 AC 308 ms
24,024 KB
testcase_23 AC 311 ms
23,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma region
#pragma GCC target("avx2")
#pragma GCC optimize("03")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std; typedef long double ld; typedef long long ll;
typedef unsigned long long ull;
#define endl "\n"
#define FOR(i,a,b) for(int i=(a);i<=(b);i++)
#define PII pair<int, int>
#define PLL pair<ll, ll>
#define VPII vector<PII>
#define VPLL vector<PLL>
#define ALL(x) (x).begin(), (x).end()
constexpr int INF=1<<30; constexpr ll LINF=1LL<<60; constexpr ll mod=1e9+7; constexpr int NIL = -1;
template<class T>inline bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T>inline bool chmin(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; }
#pragma endregion
//-------------------
vector<int> need;
vector<int> remained;

int main(){
    ios::sync_with_stdio(false); //cout << fixed << setprecision(15);
    auto ask = [](int n, int i) {
        cout << "? " << n-1 << endl;
        FOR(_,1,n) if(_!=i)cout << _ << " ";
        cout << endl;
        int ans; cin >> ans;
        return ans;
    };
    int n; cin >> n;

    FOR(i,1,n) {
        int ans = ask(n, i);
        if(ans==0) {
            need.push_back(i);
        } 
    }

    sort(ALL(need));
    cout << "! " << need.size() << endl;
    for(auto &e: need) cout << e << " ";
    cout << endl;
    return 0;
}
0