제출 #851310

#제출 시각아이디문제언어결과실행 시간메모리
851310pakapuLjeto (COCI21_ljeto)C++17
10 / 50
1 ms452 KiB
#include <bits/stdc++.h> using namespace std; bool is_from_first_team(int x) { return x >= 1 && x <= 4; } signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int last_at = -100; int last_bt = -100; int a_cnt = 0; int b_cnt = 0; int n; cin >> n; for(int i = 0; i < n; i++) { int t, a, b; cin >> t >> a >> b; if(is_from_first_team(a)) { a_cnt += 100; if(t - last_at <= 10) { a_cnt += 50; } last_at = t; } else { b_cnt += 100; if(t - last_bt <= 10) { b_cnt += 50; } last_bt = t; } } cout << a_cnt << ' ' << b_cnt << '\n'; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...