Submission #638945

# Submission time Handle Problem Language Result Execution time Memory
638945 2022-09-08T04:00:01 Z MatheusLealV Ljeto (COCI21_ljeto) C++17
50 / 50
1 ms 316 KB
#include <bits/stdc++.h>
using namespace std;

int n, last[10],L,R;
int main(){
	ios::sync_with_stdio(false); cin.tie(0);
	cin>>n;
	memset(last, -1, sizeof last);
	for(int i = 1, t,a,b; i <= n; i++){
		cin>>t>>a>>b;
		if(a <= 4) L += 100;
		else R += 100;
		if(last[a] != -1 and t - last[a] <= 10){
			if(a <= 4) L += 50;
			else R += 50;
		}
		last[a]=t;
	}
	cout<<L<<" "<<R<<"\n";
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 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 1 ms 212 KB Output is correct
4 Correct 1 ms 316 KB Output is correct
5 Correct 0 ms 316 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 0 ms 212 KB Output is correct
3 Correct 0 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 316 KB Output is correct
7 Correct 0 ms 316 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 316 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 1 ms 316 KB Output is correct