結果
| 問題 |
No.934 Explosive energy drink
|
| コンテスト | |
| ユーザー |
misora192
|
| 提出日時 | 2020-04-25 22:05:25 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 761 bytes |
| コンパイル時間 | 1,787 ms |
| コンパイル使用メモリ | 168,904 KB |
| 実行使用メモリ | 25,220 KB |
| 平均クエリ数 | 709.54 |
| 最終ジャッジ日時 | 2024-07-17 03:28:49 |
| 合計ジャッジ時間 | 5,487 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 WA * 1 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i=(0);i<(n);i++)
using namespace std;
typedef long long ll;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
int m = n;
vector<bool> use(n, true);
bool first;
for(int i = n - 1; i >= 0; i--){
m--;
use[i] = false;
cout << "? " << m << endl;
first = true;
rep(j, n){
if(use[j]){
if(first){
cout << (j + 1);
first = false;
}else{
cout << " " << (j + 1);
}
}
}
cout << endl;
int ans;
cin >> ans;
m += 1 - ans;
use[i] = ans == 0;
}
cout << "! " << m << endl;
first = true;
rep(j, n){
if(use[j]){
if(first){
cout << (j + 1);
first = false;
}else{
cout << " " << (j + 1);
}
}
}
cout << endl;
}
misora192