結果
| 問題 | No.934 Explosive energy drink |
| コンテスト | |
| ユーザー |
hipopo
|
| 提出日時 | 2020-01-10 14:40:53 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 686 ms / 2,000 ms |
| + 0µs | |
| コード長 | 703 bytes |
| 記録 | |
| コンパイル時間 | 1,256 ms |
| コンパイル使用メモリ | 215,168 KB |
| 実行使用メモリ | 9,776 KB |
| 平均クエリ数 | 708.58 |
| 最終ジャッジ日時 | 2026-10-25 04:35:47 |
| 合計ジャッジ時間 | 6,055 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int n;
cin >> n;
vector<bool> use(n + 1);
int cnt = 0;
for (int i = 1; i <= n; i++) {
cout << "? " << n - 1 << endl;
for (int j = 1; j <= n; j++) {
if (i == j) continue;
cout << j;
if (j != n) cout << " ";
else cout << endl;
}
int ans;
cin >> ans;
use.at(i) = 1 - ans;
cnt += 1 - ans;
}
cout << "! " << cnt << endl;
for (int i = 1; i <= n; i++) {
if (use.at(i)) {
cout << i;
if (i != n) cout << " ";
else cout << endl;
}
}
}
hipopo