結果
問題 | No.146 試験監督(1) |
ユーザー |
|
提出日時 | 2020-06-10 23:25:28 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 41 ms / 1,000 ms |
コード長 | 378 bytes |
コンパイル時間 | 1,069 ms |
コンパイル使用メモリ | 92,844 KB |
最終ジャッジ日時 | 2025-01-11 00:57:56 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <map> #include <math.h> using namespace std; typedef long long int ll; constexpr ll mod=1e9+7; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int q; cin >> q; ll res=0; while(q--){ ll a,b; cin >> a >> b; a=(a+1)/2; (res+=(a%mod)*(b%mod))%=mod; } cout << res << endl; }