結果
問題 |
No.2828 Remainder Game
|
ユーザー |
![]() |
提出日時 | 2024-08-02 22:39:03 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 710 bytes |
コンパイル時間 | 755 ms |
コンパイル使用メモリ | 69,800 KB |
実行使用メモリ | 25,580 KB |
平均クエリ数 | 12.00 |
最終ジャッジ日時 | 2024-08-02 22:39:09 |
合計ジャッジ時間 | 3,680 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 20 |
ソースコード
#include <iostream> #include <vector> int main() { int N; std::cin >> N; std::vector<int> remainders(5, 0); // Querying with M = 5 to get individual remainders for (int i = 0; i < 5; ++i) { std::cout << "5 1\n" << i << std::endl; std::flush(std::cout); std::cin >> remainders[i]; } // Deduce potential values std::vector<int> potential_values(5); for (int i = 0; i < 5; ++i) { potential_values[i] = remainders[i] % 5; } // Output the sum int sum = 0; for (int i = 0; i < 5; ++i) { sum += potential_values[i]; } std::cout << "0 1\n" << sum << std::endl; std::flush(std::cout); return 0; }