Submission #717341

#TimeUsernameProblemLanguageResultExecution timeMemory
717341TheSahibLjeto (COCI21_ljeto)C++17
50 / 50
1 ms300 KiB
#include <bits/stdc++.h>

#define ll long long
#define oo 1e9
#define pii pair<int, int>

using namespace std;

int lastTime[9];

void solve(){
    int n; cin >> n;
    for (int i = 0; i < 9; i++)
    {
        lastTime[i] = -oo;
    }
    
    int ans1 = 0;
    int ans2 = 0;
    for (int i = 0; i < n; i++)
    {
        int t, a, b; cin >> t >> a >> b;
        if(a <= 4) ans1 += 100;
        else ans2 += 100;
        if(t - lastTime[a] <= 10)
        {
            if(a <= 4) ans1 += 50;
            else ans2 += 50;
        }
        lastTime[a] = t;
    }
    cout << ans1 << ' ' << ans2;
}

int main()
{
    solve();
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...