結果
| 問題 | No.934 Explosive energy drink |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-11-30 14:17:11 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 209 ms / 2,000 ms |
| コード長 | 607 bytes |
| 記録 | |
| コンパイル時間 | 1,306 ms |
| コンパイル使用メモリ | 212,396 KB |
| 実行使用メモリ | 30,064 KB |
| 平均クエリ数 | 709.58 |
| 最終ジャッジ日時 | 2026-06-08 05:30:26 |
| 合計ジャッジ時間 | 4,913 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
int N;
cin >> N;
auto query = [N](int v) {
cout << "? " << N - 1 << endl;
for (int i = 0; i < N; ++i) {
if (i == v) continue;
cout << i + 1 << " ";
}
cout << endl;
int res;
cin >> res;
return res;
};
vector<int> need;
for (int i = 0; i < N; ++i) {
if (!query(i)) {
need.push_back(i);
}
}
cout << "! " << need.size() << endl;
for (int i = 0; i < need.size(); ++i) {
cout << need[i] + 1 << " \n"[i + 1 == need.size()];
}
return 0;
}