結果
問題 | No.146 試験監督(1) |
ユーザー |
![]() |
提出日時 | 2017-03-08 10:22:53 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 131 ms / 1,000 ms |
コード長 | 406 bytes |
コンパイル時間 | 725 ms |
コンパイル使用メモリ | 78,284 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-23 20:52:51 |
合計ジャッジ時間 | 1,803 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 |
ソースコード
#include <iostream> #include <vector> #include <string> #include <cmath> #include <iomanip> #include <algorithm> using namespace std; using ll = long long; constexpr ll M = 1e9+7; int main() { ll N; cin >> N; ll res = 0; for(int i=0; i<N; ++i) { ll c, d; cin >> c >> d; d %= M; res += (((c+1)/2) % M) * d; res %= M; } cout << res << endl; }