Submission #974836

#TimeUsernameProblemLanguageResultExecution timeMemory
974836vjudge1Ljeto (COCI21_ljeto)C++17
50 / 50
1 ms436 KiB
#include <iostream>
using namespace std;

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

    int timelasthit[9] = {-1, -1, -1, -1, -1, -1, -1, -1};
    int timelang = 0;
    int timbebek = 0;
    for (int i = 0; i < n; i++)
    {
        int t, a, b;
        cin >> t >> a >> b;

        int score = 100;
        if (timelasthit[a] != -1 && (t - timelasthit[a]) <= 10) score += 50;
        timelasthit[a] = t;

        if (a <= 4) timelang += score;
        else timbebek += score;
    }
    
    cout << timelang << ' ' << timbebek << endl;

    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...