結果
| 問題 |
No.146 試験監督(1)
|
| コンテスト | |
| ユーザー |
nCk_cv
|
| 提出日時 | 2016-01-20 17:58:01 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 527 bytes |
| コンパイル時間 | 589 ms |
| コンパイル使用メモリ | 71,396 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-21 14:50:55 |
| 合計ジャッジ時間 | 1,668 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 3 |
ソースコード
#include <iostream>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <algorithm>
#include <string>
#include <map>
#include <queue>
#include <memory.h>
using namespace std;
const int INF = 2 << 27;
typedef long long ll;
typedef pair<int,int> P;
int main() {
int n;
cin >> n;
ll sum = 0;
for(int i = 0; i < n; i++) {
ll c;
cin >> c;
c %= 1000000007;
ll d;
cin >> d;
sum += d * (((c/2)%1000000007) + 1 -(c%2==0?1:0)) % 1000000007;
sum %= 1000000007;
}
cout << sum << endl;
}
nCk_cv