結果
問題 | No.934 Explosive energy drink |
ユーザー |
![]() |
提出日時 | 2020-11-10 08:15:51 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 358 ms / 2,000 ms |
コード長 | 613 bytes |
コンパイル時間 | 803 ms |
コンパイル使用メモリ | 71,324 KB |
実行使用メモリ | 25,220 KB |
平均クエリ数 | 709.58 |
最終ジャッジ日時 | 2024-07-17 07:22:02 |
合計ジャッジ時間 | 5,655 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
#include <iostream> #include <vector> using namespace std; int main(){ int N; cin >> N; vector<int> b; for (int i = 0; i < N; i++){ vector<int> a; for (int j = 0; j < N; j++){ if (i != j){ a.push_back(j); } } cout << '?' << ' ' << N - 1 << endl; for (int j = 0; j < N - 1; j++){ cout << a[j] + 1; if (j < N - 2){ cout << ' '; } } cout << endl; int ans; cin >> ans; if (ans == 0){ b.push_back(i); } } int K = b.size(); cout << '!' << ' ' << K << endl; for (int i = 0; i < K; i++){ cout << b[i] + 1; if (i < K - 1){ cout << ' '; } } cout << endl; }