Submission #851488

#TimeUsernameProblemLanguageResultExecution timeMemory
851488cjtsaiLjeto (COCI21_ljeto)C++14
50 / 50
1 ms600 KiB
#include<iostream> #include <algorithm> #include <vector> #define ff first #define ss second #define piii pair<int, pair<int, int>> using namespace std; signed main(){ int n;cin>>n; vector<piii> li(n); for(int i=0; i<n; i++){ int a, b, c;cin>>a>>b>>c; li[i]={a, {b, c}}; } int ta=0, tb=0; vector<int> is(9, -10000); for(int i=0; i<n; i++){ int at=li[i].ff, aa=li[i].ss.ff, ab=li[i].ss.ss; if(at-10<=is[aa]){ if(aa>4&&ab<5) {tb+=150;is[aa]=at;} if(aa<5&&ab>4) {ta+=150;is[aa]=at;} }else{ if(aa>4&&ab<5) {tb+=100;is[aa]=at;} if(aa<5&&ab>4) {ta+=100;is[aa]=at;} } } cout<<ta<<' '<<tb; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...