結果
問題 | No.934 Explosive energy drink |
ユーザー | aajisaka |
提出日時 | 2019-12-15 02:50:29 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,722 bytes |
コンパイル時間 | 3,033 ms |
コンパイル使用メモリ | 172,812 KB |
実行使用メモリ | 24,516 KB |
平均クエリ数 | 709.50 |
最終ジャッジ日時 | 2023-09-23 19:17:08 |
合計ジャッジ時間 | 7,239 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 173 ms
23,976 KB |
testcase_02 | AC | 26 ms
23,784 KB |
testcase_03 | AC | 98 ms
24,000 KB |
testcase_04 | AC | 299 ms
24,060 KB |
testcase_05 | AC | 26 ms
23,328 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 26 ms
23,448 KB |
testcase_10 | AC | 25 ms
23,976 KB |
testcase_11 | AC | 25 ms
23,328 KB |
testcase_12 | AC | 28 ms
23,568 KB |
testcase_13 | AC | 29 ms
24,276 KB |
testcase_14 | AC | 30 ms
24,048 KB |
testcase_15 | AC | 98 ms
24,060 KB |
testcase_16 | AC | 36 ms
23,412 KB |
testcase_17 | AC | 51 ms
23,976 KB |
testcase_18 | AC | 52 ms
23,592 KB |
testcase_19 | AC | 81 ms
23,796 KB |
testcase_20 | AC | 126 ms
23,412 KB |
testcase_21 | AC | 136 ms
23,988 KB |
testcase_22 | AC | 176 ms
23,676 KB |
testcase_23 | AC | 175 ms
23,592 KB |
ソースコード
/** * code generated by JHelper * More info: https://github.com/AlexeyDmitriev/JHelper * @author aajisaka */ #include<bits/stdc++.h> using namespace std; void debug_out() { cerr << endl; } template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) { cerr << " " << to_string(H); debug_out(T...); } #ifdef LOCAL #define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__) #else #define debug(...) 42 #endif #define SPEED ios_base::sync_with_stdio(false);cin.tie(nullptr) #define rep(i,n) for(int i=0; i<(int)(n); i++) #define all(v) v.begin(), v.end() template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } using ll = long long; using P = pair<ll, ll>; constexpr double PI = 3.14159265358979323846; mt19937_64 engine(chrono::steady_clock::now().time_since_epoch().count()); class ExplosiveEnergyDrink { public: void solve(istream& cin, ostream& cout) { SPEED; int n; cin >> n; set<int> st; for(int i=1; i<=n; i++) { st.insert(i); } for(int i=1; i<=n; i++) { st.erase(i); cout << "? " << st.size() << endl; for(auto e: st) { cout << e << ' '; } cout << endl; int ans; cin >> ans; if (ans==0) { st.insert(i); } } cout << "! " << st.size() << endl; for(auto e: st) { cout << e << ' '; } cout << endl; } }; signed main() { ExplosiveEnergyDrink solver; std::istream& in(std::cin); std::ostream& out(std::cout); solver.solve(in, out); return 0; }