답안 #974278

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
974278 2024-05-03T07:18:36 Z vjudge1 Ljeto (COCI21_ljeto) C++17
50 / 50
1 ms 348 KB
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define pii pair<ll,ll>
signed main(){
	ios_base::sync_with_stdio(false); cin.tie(nullptr);
	ll tc = 1;
	// cin >> tc;
	while(tc--){
		ll n; cin >> n;
		vector<ll>t(n+5), a(n+5), b(n+5);
		vector<ll>isi[15];
		for(int i=0;i<n;i++){
			cin >> t[i] >> a[i] >> b[i];
			isi[a[i]].pb(t[i]);
		}
		ll prev = -1, skora = 0, skorb = 0;
		for(int i=1;i<=4;i++){
			prev = -1;
			for(auto j : isi[i]){
				if(prev == -1 || prev < j - 10) skora += 100;
				else skora += 150;
				prev = j;
			}
		}
		for(int i=5;i<=8;i++){
			prev = -1;
			for(auto j : isi[i]){
				if(prev == -1 || prev < j - 10) skorb += 100;
				else skorb += 150;
				prev = j;
			}
		}
		cout << skora << " " << skorb << endl;
	}
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 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 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 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 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 1 ms 344 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 1 ms 344 KB Output is correct