結果
問題 | No.146 試験監督(1) |
ユーザー |
|
提出日時 | 2020-06-10 23:25:28 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 35 ms / 1,000 ms |
コード長 | 378 bytes |
コンパイル時間 | 854 ms |
コンパイル使用メモリ | 96,400 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-23 19:31:16 |
合計ジャッジ時間 | 1,548 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 35 ms
6,816 KB |
testcase_01 | AC | 34 ms
6,944 KB |
testcase_02 | AC | 35 ms
6,944 KB |
ソースコード
#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; }