Submission #1294927

#TimeUsernameProblemLanguageResultExecution timeMemory
1294927avohadoLjeto (COCI21_ljeto)C++20
50 / 50
1 ms724 KiB
#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define maxn 300005
#define f first
#define s second
#define ll long long
#define pb(x) push_back(x)
#define mp make_pair
#define all(x) x.begin(), x.end()
void solve(){
    int n;
    cin >> n;
    int p[2]={0, 0};
    int t[n], a[n], b[n];
    for(int i=0; i<n; i++){
        cin >> t[i] >> a[i] >> b[i];
        p[(a[i]-1)/4]+=100;
        for(int j=i-1; j>=0&&t[i]-t[j]<=10; j--){
            if(a[j]==a[i]){
                p[(a[i]-1)/4]+=50;break;
            }
        }
    }
    cout << p[0] << " " << p[1];
}
int main(){
    cin.tie(nullptr)->sync_with_stdio(0);
    int t=1;
    //cin >> t;
    while(t--){
        solve();
        cout << "\n";
    }
    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...