답안 #851487

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
851487 2023-09-20T00:52:12 Z cjtsai Ljeto (COCI21_ljeto) C++14
0 / 50
1 ms 348 KB
#include<iostream>
#include <algorithm>
#include <vector>
#define ff first
#define ss second
#define piii pair<int, pair<int, int>>
using namespace std;
signed main(){
	int n;cin>>n;
	vector<piii> li(n);
	for(int i=0; i<n; i++){
		int a, b, c;cin>>a>>b>>c;
		li[i]={a, {b, c}};
	}

	int ta=0, tb=0;
	vector<int> is(9, 10000);
	for(int i=0; i<n; i++){
		int at=li[i].ff, aa=li[i].ss.ff, ab=li[i].ss.ss;
		if(at-10>=is[aa]){
			if(aa>4&&ab<5) {tb+=150;is[aa]=at;}
			if(aa<5&&ab>4) {ta+=150;is[aa]=at;}
		}else{
			if(aa>4&&ab<5) {tb+=100;is[aa]=at;}
			if(aa<5&&ab>4) {ta+=100;is[aa]=at;}
		}
	}
	cout<<ta<<' '<<tb;
	
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Incorrect 1 ms 344 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -