結果
| 問題 | No.934 Explosive energy drink |
| コンテスト | |
| ユーザー |
hipopo
|
| 提出日時 | 2020-01-10 14:40:53 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 211 ms / 2,000 ms |
| コード長 | 703 bytes |
| 記録 | |
| コンパイル時間 | 2,038 ms |
| コンパイル使用メモリ | 212,724 KB |
| 実行使用メモリ | 30,064 KB |
| 平均クエリ数 | 708.58 |
| 最終ジャッジ日時 | 2026-06-08 12:19:43 |
| 合計ジャッジ時間 | 5,129 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_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