답안 #1032725

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1032725 2024-07-24T06:58:56 Z vjudge1 Ljeto (COCI21_ljeto) C++17
50 / 50
1 ms 432 KB
#include <bits/stdc++.h>
using namespace std;

#define ll long long
int const N=2e5+5;
int const inf=1e9+7;

void solve(){
	int n;
	cin>>n;
	int prev[9];
	for (int i = 0; i < 9; ++i)
		prev[i]=-inf;
	int c1=0,c2=0;
	for (int i = 0; i < n; ++i)
	{
		int t,a,b;
		cin>>t>>a>>b;
		if(a<=4){
			c1+=100;
			if(prev[a]+10>=t)
				c1+=50;
			prev[a]=t;
		}
		else{
			c2+=100;
			if(prev[a]+10>=t)
				c2+=50;
			prev[a]=t;
		}
	}
	cout<<c1<<' '<<c2<<endl;
}

int main(){
	int t=1;
	// cin>>t;
	while(t--)
		solve();
	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 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 432 KB Output is correct
5 Correct 0 ms 356 KB Output is correct
6 Correct 0 ms 352 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 344 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 432 KB Output is correct
7 Correct 0 ms 356 KB Output is correct
8 Correct 0 ms 352 KB Output is correct
9 Correct 1 ms 344 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 0 ms 360 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 352 KB Output is correct