結果
| 問題 |
No.934 Explosive energy drink
|
| コンテスト | |
| ユーザー |
trineutron
|
| 提出日時 | 2020-02-25 01:01:45 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 379 ms / 2,000 ms |
| コード長 | 679 bytes |
| コンパイル時間 | 2,140 ms |
| コンパイル使用メモリ | 196,292 KB |
| 最終ジャッジ日時 | 2025-01-09 02:08:30 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> ans;
int n;
cin >> n;
for (int i = 0; i < n; i++) {
cout << "? " << n - 1 << endl;
for (int j = 0; j < n; j++) {
if (i == j) continue;
if (j > 0 && (i > 0 || j >= 2)) cout << " ";
cout << j + 1;
}
cout << endl;
int e;
cin >> e;
if (e == 0) ans.push_back(i + 1);
}
cout << "! " << ans.size() << endl;
for (int i = 0; i < ans.size(); i++) {
cout << ans.at(i);
if (i == ans.size() - 1) {
cout << endl;
} else {
cout << " ";
}
}
}
trineutron