Submission #797023

# Submission time Handle Problem Language Result Execution time Memory
797023 2023-07-29T04:51:28 Z tlnk07 Ljeto (COCI21_ljeto) C++17
50 / 50
1 ms 300 KB
#include<bits/stdc++.h>
using namespace std;

long long n, pre[10], ans1 = 0, ans2 = 0, x, y, z;

int main()
{
	memset(pre, -1, sizeof(pre));
	cin >> n;
	while(n--)
	{
		cin >> x >> y >> z;
		if(pre[y] == -1)
		{
			if(y <= 4)	ans1 += 100;
			else	ans2 += 100;
		}
		else if(x - pre[y] <= 10)
		{
			if(y <= 4)	ans1 += 150;
			else	ans2 += 150;
		}
		else
		{
			if(y <= 4)	ans1 += 100;
			else	ans2 += 100;
		}
		pre[y] = x;
	}
	cout << ans1 << " " << ans2;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 296 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 300 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 296 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 300 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 300 KB Output is correct
12 Correct 1 ms 300 KB Output is correct
13 Correct 1 ms 212 KB Output is correct