Submission #1032689

#TimeUsernameProblemLanguageResultExecution timeMemory
1032689vjudge1Ljeto (COCI21_ljeto)C++17
10 / 50
1 ms600 KiB
#include <bits/stdc++.h>
using namespace std;

int main(){
    int n;
    cin >> n;

    int last[8];
    memset(last, -1, sizeof last);

    int ans[2] = {};
    for (int i = 0; i < n; i ++){
        int t, a, b;
        cin >> t >> a >> b;

        if (last[a] >= 0 and last[a] >= t - 10)
            ans[(a < 5)] += 50;
        ans[(a < 5)] += 100;
        last[a] = t;
    }

    cout << ans[1] << " " << ans[0] << endl;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...