結果
問題 |
No.934 Explosive energy drink
|
ユーザー |
|
提出日時 | 2019-11-30 14:16:50 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 603 bytes |
コンパイル時間 | 2,771 ms |
コンパイル使用メモリ | 194,984 KB |
最終ジャッジ日時 | 2025-01-08 06:27:17 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 24 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); int N; cin >> N; auto query = [N](int v) { cout << "? " << N - 1 << endl; for (int i = 0; i < N; ++i) { if (i == v) continue; cout << i + 1 << " "; } cout << endl; int res; cin >> res; return res; }; vector<int> need; for (int i = 0; i < N; ++i) { if (!query(i)) { need.push_back(i); } } cout << "! " << need.size() << endl; for (int i = 0; i < need.size(); ++i) { cout << need[i] << " \n"[i + 1 == need.size()]; } return 0; }