Submission #974278

#TimeUsernameProblemLanguageResultExecution timeMemory
974278vjudge1Ljeto (COCI21_ljeto)C++17
50 / 50
1 ms348 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define pii pair<ll,ll> signed main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); ll tc = 1; // cin >> tc; while(tc--){ ll n; cin >> n; vector<ll>t(n+5), a(n+5), b(n+5); vector<ll>isi[15]; for(int i=0;i<n;i++){ cin >> t[i] >> a[i] >> b[i]; isi[a[i]].pb(t[i]); } ll prev = -1, skora = 0, skorb = 0; for(int i=1;i<=4;i++){ prev = -1; for(auto j : isi[i]){ if(prev == -1 || prev < j - 10) skora += 100; else skora += 150; prev = j; } } for(int i=5;i<=8;i++){ prev = -1; for(auto j : isi[i]){ if(prev == -1 || prev < j - 10) skorb += 100; else skorb += 150; prev = j; } } cout << skora << " " << skorb << endl; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...