結果
| 問題 |
No.934 Explosive energy drink
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-01-03 13:15:47 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 346 ms / 2,000 ms |
| コード長 | 629 bytes |
| コンパイル時間 | 1,774 ms |
| コンパイル使用メモリ | 194,716 KB |
| 最終ジャッジ日時 | 2025-01-08 15:58:53 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
vector <int> ans;
for (int i = 1; i <= n; i++) {
cout << "? " << n - 1 << endl;
for (int j = 1; j <= n; j++) {
if (i != j) {
cout << j;
if (j == n || (i == n && j == n - 1)) {
cout << endl;
} else {
cout << " ";
}
}
}
int a;
cin >> a;
if (!a) {
ans.push_back(i);
}
}
cout << "! " << ans.size() << endl;
for (int i = 0; i < ans.size(); i++) {
cout << ans[i];
if (i == ans.size() - 1) {
cout << endl;
} else {
cout << " ";
}
}
return 0;
}