結果
問題 |
No.934 Explosive energy drink
|
ユーザー |
![]() |
提出日時 | 2019-12-29 15:26:11 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 338 ms / 2,000 ms |
コード長 | 629 bytes |
コンパイル時間 | 1,857 ms |
コンパイル使用メモリ | 194,956 KB |
最終ジャッジ日時 | 2025-01-08 15:14:29 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; }