Submission #643927

# Submission time Handle Problem Language Result Execution time Memory
643927 2022-09-23T09:23:05 Z elif Ljeto (COCI21_ljeto) C++17
50 / 50
1 ms 300 KB
#include <bits/stdc++.h>
using namespace std;

int main(){

	int n;
	cin >> n;
	int pa = 0, pb = 0;
	map<int, int> mp;

	for(int i=1; i<=8; i++)
		mp[i] = -11;

	for(int i=0; i<n; i++){
		int t, u, v;
		cin >> t >> u >> v;

		int p = 100;
		if(t - mp[u] <= 10)
			p += 50;
		mp[u] = t;

		if(u < 5)
			pa += p;
		else pb += p;
	}

	cout << pa << " " << pb << endl;

	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 300 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 300 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 1 ms 300 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 300 KB Output is correct
3 Correct 1 ms 300 KB Output is correct
4 Correct 1 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 212 KB Output is correct
8 Correct 1 ms 300 KB Output is correct
9 Correct 1 ms 296 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct