結果

問題 No.146 試験監督(1)
ユーザー ふうふう
提出日時 2015-02-22 15:36:03
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 705 bytes
コンパイル時間 551 ms
コンパイル使用メモリ 83,368 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-06 02:57:33
合計ジャッジ時間 1,706 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #


#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <map>
#include <set>
#include <list>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
#include <iomanip>
#include <functional>

#define SIZE 1005
#define INF 100000000
#define ll long long
#define FD(d) fixed << setprecision(d)
#define MOD 1000000007
     
using namespace std;
 
#define ll long long
 
typedef pair<int, int> Pa;

int main()
{
	ll n;

	cin >> n;

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

	return (0);
}
0