답안 #698638

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
698638 2023-02-14T06:30:57 Z ld_minh4354 Ljeto (COCI21_ljeto) C++14
50 / 50
1 ms 316 KB
#include<bits/stdc++.h>
using namespace std;

#define int long long
#define fi first
#define se second
#define pb push_back



signed main()
{
	ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
//	freopen("input.000","r",stdin);
//	freopen("output.000","w",stdout);
//	srand((unsigned)time(NULL));
//	rand()
	
	int n,i,t,a,b,l[10],a_ans,b_ans;
	
	for (i=1;i<9;i++) l[i]=-1e9;
	a_ans=0;b_ans=0;
	
	cin>>n;
	for (i=1;i<n+1;i++)
	{
		cin>>t>>a>>b;
		if (a<=4) a_ans+=100;else b_ans+=100;
		if (t-l[a]<=10)
		{
			if (a<=4) a_ans+=50;else b_ans+=50;
		}
		
		l[a]=t;
	}
	
	cout<<a_ans<<" "<<b_ans;
}

# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 316 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
# 결과 실행 시간 메모리 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 316 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct