結果
問題 |
No.934 Explosive energy drink
|
ユーザー |
![]() |
提出日時 | 2019-11-11 19:00:55 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 285 ms / 2,000 ms |
コード長 | 588 bytes |
コンパイル時間 | 1,950 ms |
コンパイル使用メモリ | 171,532 KB |
実行使用メモリ | 25,604 KB |
平均クエリ数 | 709.58 |
最終ジャッジ日時 | 2024-07-16 18:13:34 |
合計ジャッジ時間 | 6,002 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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::string query = "? " + std::to_string(n - 1) + "\n"; for (int j = 1; j <= n; j++) if (i != j) query += std::to_string(j) + " "; query.pop_back(); std::cout << query << std::endl; if (!ri()) res.push_back(i); } std::cout << "! " << res.size() << std::endl; for (int i = 0; i < (int) res.size(); i++) { if (i) std::cout << " "; std::cout << res[i]; } std::cout << std::endl; return 0; }