Submission #671041

# Submission time Handle Problem Language Result Execution time Memory
671041 2022-12-11T17:26:42 Z Nimbostratus Ljeto (COCI21_ljeto) C++17
50 / 50
1 ms 280 KB
#include <bits/stdc++.h>
using namespace std;
using lint = long long;
const int maxn = 1005;
const int inf = 1e9 + 5;
const int mod = 1e9 + 7;

int n;
int score[2];
int last[maxn];

signed main() {
	#ifdef Local
	freopen("in.txt", "r", stdin);
	freopen("out.txt", "w", stdout);
	#endif
	cin >> n;
	fill(last + 1, last + n + 1, -inf);
	for(int i = 1, t, x, y; i <= n; i++) {
		cin >> t >> x >> y;
		int team = x > 4;
		score[team] += 100;
		if(t - last[x] <= 10)
			score[team] += 50;
		last[x] = t;
	}
	cout << score[0] << " " << score[1] << endl;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 280 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 280 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct