結果
| 問題 |
No.2828 Remainder Game
|
| コンテスト | |
| ユーザー |
begemot
|
| 提出日時 | 2024-08-02 22:18:06 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 471 bytes |
| コンパイル時間 | 595 ms |
| コンパイル使用メモリ | 65,496 KB |
| 実行使用メモリ | 25,464 KB |
| 平均クエリ数 | 1057.50 |
| 最終ジャッジ日時 | 2024-08-02 22:18:10 |
| 合計ジャッジ時間 | 3,592 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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] -= tmp + a[i];
}
}
}
cout << 0 << " " << 1 << endl;
cout << res << endl;
return 0;
}
begemot