結果
問題 |
No.2828 Remainder Game
|
ユーザー |
![]() |
提出日時 | 2024-08-02 22:29:59 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 479 bytes |
コンパイル時間 | 649 ms |
コンパイル使用メモリ | 65,516 KB |
実行使用メモリ | 25,464 KB |
平均クエリ数 | 1057.50 |
最終ジャッジ日時 | 2024-08-02 22:30:05 |
合計ジャッジ時間 | 3,567 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 15 |
ソースコード
#include <iostream> typedef long long ll; const int MAXN = 2e5 + 5; using namespace std; int a[MAXN], N, res, tmp; int main() { ios::sync_with_stdio(false); cin >> N; for (int i = N; i >= 1; --i) { cout << i << " " << 1 << endl; cout << 0 << endl; cin >> tmp; if (tmp + a[i]) { res += i * (tmp + a[i]); for (int j = 1; j < i; ++j) { if (i % j == 0) a[j] = a[j] - (tmp + a[i]); } } } cout << 0 << " " << 1 << endl; cout << res << endl; return 0; }