結果
| 問題 | No.934 Explosive energy drink |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-11-30 01:25:33 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 318 ms / 2,000 ms |
| コード長 | 859 bytes |
| 記録 | |
| コンパイル時間 | 827 ms |
| コンパイル使用メモリ | 98,008 KB |
| 実行使用メモリ | 25,476 KB |
| 平均クエリ数 | 709.08 |
| 最終ジャッジ日時 | 2024-07-16 18:56:25 |
| 合計ジャッジ時間 | 4,434 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
#include<iostream>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<set>
#include<map>
#include<queue>
#include<vector>
using namespace std;
typedef long long ll;
const int MOD=1e9+7;
int main() {
cin.tie(0),cout.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
vector<int> ans;
for(int i=1; i<=n; i++) {
vector<int> v=ans;
for(int j=i+1; j<=n; j++) {
v.push_back(j);
}
if(v.size()<2) {
ans.push_back(i);
continue;
}
cout << '?' << " " << v.size() << endl;
for(int j=0; j<v.size()-1; j++) {
cout << v[j] << " ";
}
cout << v[v.size()-1] << endl;
int x;
cin >> x;
if(!x) {
ans.push_back(i);
}
}
cout << '!' << " " << ans.size() << endl;
for(int i=0; i<ans.size()-1; i++) {
cout << ans[i] << " ";
}
cout << ans[ans.size()-1] << endl;
}