Submission #520310

#TimeUsernameProblemLanguageResultExecution timeMemory
520310it111Ljeto (COCI21_ljeto)C++14
50 / 50
1 ms312 KiB
#include <bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int pirmi = 0; int antri = 0; int kiek; cin >> kiek; int kada[9] = {0}; while(kiek--){ int laikas,a,b; cin >> laikas >> a >> b; if(a>=1 and a<=4){ pirmi += 100; if(laikas-kada[a]<=10 and kada[a]!=0){ pirmi += 50; } kada[a] = laikas; } else{ antri += 100; if(laikas-kada[a]<=10 and kada[a]!=0){ antri += 50; } kada[a] = laikas; } } cout << pirmi << " " << antri; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...