結果
問題 |
No.934 Explosive energy drink
|
ユーザー |
|
提出日時 | 2019-11-29 22:46:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 593 bytes |
コンパイル時間 | 1,482 ms |
コンパイル使用メモリ | 170,120 KB |
実行使用メモリ | 25,476 KB |
平均クエリ数 | 709.50 |
最終ジャッジ日時 | 2024-07-16 18:42:49 |
合計ジャッジ時間 | 6,221 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 WA * 4 |
ソースコード
#include "bits/stdc++.h" #define rep(i,n) for(int i=0;i<n;i++) using namespace std; using ll = long long; int main() { int N, K, ans; cin >> N; K = N; vector<bool> f(N, false); rep(i, N) { cout << "? " << K - 1 << endl; rep(j, N) { if (i == j || f[j]) continue; cout << j + 1 << " "; } cout << endl; cin >> ans; if (ans == 1) { f[i] = true; K--; } } cout << "! " << K << endl; rep(i, N) { if (!f[i]) cout << i + 1 << " "; } cout << endl; }