結果
| 問題 |
No.146 試験監督(1)
|
| コンテスト | |
| ユーザー |
m1025o1184t
|
| 提出日時 | 2019-12-03 14:15:51 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 496 bytes |
| コンパイル時間 | 1,507 ms |
| コンパイル使用メモリ | 168,328 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-27 06:07:10 |
| 合計ジャッジ時間 | 2,195 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 3 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define all(a) (a).begin(),(a).end()
using namespace std;
typedef long long ll;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
ll mod = 1000000007;
int n;
cin >> n;
vector<ll> c(n);
vector<ll> d(n);
rep(i,n){
cin >> c[i] >> d[i];
}
ll ans=0;
rep(i,n){
ll k;
if(c[i] % 2 == 0) k = c[i] / 2;
else k = (c[i] + 1) / 2;
ans += k * d[i];
ans %= mod;
}
cout << ans << endl;
return 0;
}
m1025o1184t