結果
| 問題 |
No.934 Explosive energy drink
|
| コンテスト | |
| ユーザー |
QCFium
|
| 提出日時 | 2019-11-09 10:29:42 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 344 ms / 2,000 ms |
| コード長 | 476 bytes |
| コンパイル時間 | 1,532 ms |
| コンパイル使用メモリ | 168,840 KB |
| 実行使用メモリ | 25,220 KB |
| 平均クエリ数 | 709.58 |
| 最終ジャッジ日時 | 2024-07-16 18:12:58 |
| 合計ジャッジ時間 | 6,380 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
#include <bits/stdc++.h>
int ri() {
int n;
scanf("%d", &n);
return n;
}
int main() {
int n = ri();
assert(n >= 3);
std::vector<int> res;
for (int i = 1; i <= n; i++) {
std::cout << "? " << n - 1 << std::endl;
for (int j = 1; j <= n; j++) if (i != j) std::cout << j << " ";
std::cout << std::endl;
if (!ri()) res.push_back(i);
}
std::cout << "! " << res.size() << std::endl;
for (auto i : res) std::cout << " " << i;
std::cout << std::endl;
return 0;
}
QCFium