結果
問題 |
No.146 試験監督(1)
|
ユーザー |
![]() |
提出日時 | 2016-02-14 15:31:42 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 139 ms / 1,000 ms |
コード長 | 351 bytes |
コンパイル時間 | 516 ms |
コンパイル使用メモリ | 55,388 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-22 06:29:58 |
合計ジャッジ時間 | 1,876 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 |
ソースコード
#include <iostream> using namespace std; int main() { int n, ans = 0; auto mod = [](long long x){return x % 1000000007;}; cin >> n; for (int i = 0; i < n; i++) { long long c, d; cin >> c >> d; c = mod((c+1)/2); d = mod(d); ans = mod(ans + c * d); } cout << ans << endl; return 0; }