結果

問題 No.146 試験監督(1)
ユーザー weaken
提出日時 2020-11-15 02:46:48
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 513 bytes
コンパイル時間 3,057 ms
コンパイル使用メモリ 193,004 KB
最終ジャッジ日時 2025-01-16 00:43:53
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define fastIO (cin.tie(0), cout.tie(0), ios::sync_with_stdio(false))
#define precise(i) fixed << setprecision(i)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;

const int MOD = 1000000009;
int main() {
  fastIO;
  int n;
  cin >> n;

  long long cnt = 0;
  for (int i = 0; i < n; i++) {
    long long c, d;
    cin >> c >> d;
    c = c % MOD;
    d = d % MOD;
    cnt += ((c + 1) / 2 * d) % MOD;
    cnt %= MOD;
  }
  cout << cnt % MOD << '\n';

  return 0;
}
0