제출 #1130733

#제출 시각아이디문제언어결과실행 시간메모리
1130733minggaLjeto (COCI21_ljeto)C++17
50 / 50
0 ms328 KiB
#include "bits/stdc++.h"

using namespace std;

#define ln "\n"
#define pb push_back
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define int long long
const int MOD = 1e9 + 7;
const int inf = 2e18;
const int N = 105;
int n, pre[10];

signed main() {
	cin.tie(0) -> sync_with_stdio(0);
	cin >> n;
	int A = 0, B = 0;
	for(int i = 1; i <= n; i++) {
		int t, a, b; cin >> t >> a >> b;
		if(a < b) {
			A += 100;
			if(t - pre[a] <= 10 and pre[a] != 0) A += 50;
			pre[a] = t;
		} else {
			B += 100;
			if(t - pre[a] <= 10 and pre[a] != 0) B += 50;
			pre[a] = t;
		}
	}
	cout << A << ' ' << B << ln;
    cerr << "\nTime: " << clock() * 1000 / CLOCKS_PER_SEC;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...