結果
| 問題 |
No.934 Explosive energy drink
|
| コンテスト | |
| ユーザー |
minato
|
| 提出日時 | 2019-11-29 22:26:28 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 362 ms / 2,000 ms |
| コード長 | 601 bytes |
| コンパイル時間 | 1,779 ms |
| コンパイル使用メモリ | 169,748 KB |
| 実行使用メモリ | 25,464 KB |
| 平均クエリ数 | 709.58 |
| 最終ジャッジ日時 | 2024-07-16 18:37:07 |
| 合計ジャッジ時間 | 6,608 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
const double PI = acos(-1);
const ll MOD = 1000000007;
using Graph = vector<vector<int>>;
int main() {
int N; cin >> N;
vector<int> a(N),b(0);
int K = 0;
rep(i,N) {
cout << "? " << N-1 << endl;
rep(j,N) {
if (i == j) continue;
cout << j+1 << " ";
}
cout << endl;
int ans; cin >> ans;
if (ans == 0) {
K++;
b.push_back(i+1);
}
}
cout << "! " << K << endl;
rep(i,b.size()) cout << b[i] << " ";
cout << endl;
}
minato