結果
問題 | No.2828 Remainder Game |
ユーザー | Carpenters-Cat |
提出日時 | 2024-08-02 22:24:11 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 78 ms / 2,000 ms |
コード長 | 460 bytes |
コンパイル時間 | 2,057 ms |
コンパイル使用メモリ | 204,556 KB |
実行使用メモリ | 25,464 KB |
平均クエリ数 | 17.60 |
最終ジャッジ日時 | 2024-08-02 22:24:16 |
合計ジャッジ時間 | 4,932 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 71 ms
24,556 KB |
testcase_01 | AC | 66 ms
24,940 KB |
testcase_02 | AC | 66 ms
24,812 KB |
testcase_03 | AC | 67 ms
24,812 KB |
testcase_04 | AC | 67 ms
24,940 KB |
testcase_05 | AC | 68 ms
24,812 KB |
testcase_06 | AC | 67 ms
24,568 KB |
testcase_07 | AC | 67 ms
25,208 KB |
testcase_08 | AC | 78 ms
25,464 KB |
testcase_09 | AC | 65 ms
24,824 KB |
testcase_10 | AC | 64 ms
24,952 KB |
testcase_11 | AC | 66 ms
24,952 KB |
testcase_12 | AC | 61 ms
25,208 KB |
testcase_13 | AC | 59 ms
24,568 KB |
testcase_14 | AC | 68 ms
24,952 KB |
testcase_15 | AC | 59 ms
24,824 KB |
testcase_16 | AC | 60 ms
24,824 KB |
testcase_17 | AC | 64 ms
24,824 KB |
testcase_18 | AC | 59 ms
24,568 KB |
testcase_19 | AC | 58 ms
24,824 KB |
ソースコード
#include <bits/stdc++.h> using namespace std; int main () { int N; cin >> N; int M = N + 1; int ans = 0; for (int i = 0; (1 << i) < M; i++) { std::vector<int> X; for (int j = 0; j < M; j ++) { if ((j >> i) & 1) { X.push_back(j); } } cout << M << " " << X.size() << endl; for (auto& a : X) { cout << a << (a == X.back() ? "" : " "); } cout<< endl; int x; cin >> x; ans += (1 << i) * x; } cout << "0 1\n" << ans << endl; }