Submission #716475

#TimeUsernameProblemLanguageResultExecution timeMemory
716475Sandarach151Ljeto (COCI21_ljeto)C++17
50 / 50
1 ms212 KiB
#include <bits/stdc++.h>
 
using namespace std;
 
int main()
{
    int n, pa = 0, pb = 0;
    vector<int> last(8, -11);
    cin>> n;
    for (int i= 0; i <n; ++i){
        int t, j1, j2;
        cin>> t>> j1>> j2;
        if (j1 < 5) pa += 100;
        else pb += 100;
        if (t- last[j1-1] <= 10){
            if (j1 < 5) pa += 50;
            else pb += 50;
        }
        last[j1 -1] = t;
    }
    cout<< pa<< ' ' << pb << '\n';
 
    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...