제출 #1261686

#제출 시각아이디문제언어결과실행 시간메모리
1261686gry3125Ljeto (COCI21_ljeto)C++20
50 / 50
0 ms500 KiB
#include <bits/stdc++.h>
#define owo ios_base::sync_with_stdio(0);cin.tie(0);
#define all(v) (v).begin(),(v).end()
#define pb push_back
#define fi first
#define se second
typedef long long int ll;
using namespace std;

int main() {
    owo
    int n; cin >> n;
    vector<int> cur(9);
    int sc1 = 0, sc2 = 0;
    for (int i = 0; i < 9; i++) {
        cur[i] = -100;
    }
    for (int i = 0; i < n; i++) {
        int t, a, b; cin >> t >> a >> b;
        if (a <= 4) {
            if (cur[a] >= t-10) sc1 += 150;
            else sc1 += 100;
            cur[a] = t;
        } else {
            if (cur[a] >= t-10) sc2 += 150;
            else sc2 += 100;
            cur[a] = t;
        }
    }
    cout << sc1 << " " << sc2;
    return 0;
}

#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...