Submission #861735

# Submission time Handle Problem Language Result Execution time Memory
861735 2023-10-16T21:00:25 Z Cyber_Wolf Ljeto (COCI21_ljeto) C++17
50 / 50
1 ms 348 KB
#include <bits/stdc++.h>

using namespace std;

#define lg long long 

int main()
{
	lg n;
	cin >> n;
	vector<lg> la(8, -10000000000);
	lg a = 0, b = 0;
	for(int i = 0; i < n; i++)
	{
		lg t, u, v;
		cin >> t >> u >> v;
		if(u <= 4)	a += 100;
		else	b += 100;
		u--;
		if(t-la[u] <= 10 && u < 4)	a += 50;
		else if(t-la[u] <= 10)	b += 50;
		la[u] = t;
	}
	cout << a << ' ' << b << '\n';
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 1 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct