結果

問題 No.146 試験監督(1)
ユーザー mamekinmamekin
提出日時 2015-02-09 23:17:53
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 127 ms / 1,000 ms
コード長 666 bytes
コンパイル時間 1,106 ms
コンパイル使用メモリ 86,544 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-05 21:29:52
合計ジャッジ時間 1,691 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
4,376 KB
testcase_01 AC 127 ms
4,376 KB
testcase_02 AC 126 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
using namespace std;

const int MOD = 1000000007;

int main()
{
    int n;
    cin >> n;

    long long ret = 0;
    for(int i=0; i<n; ++i){
        long long c, d;
        cin >> c >> d;
        ret += ((c + 1) / 2 % MOD) * (d % MOD);
        ret %= MOD;
    }
    cout << ret << endl;

    return 0;
}
0