Submission #499400

#TimeUsernameProblemLanguageResultExecution timeMemory
499400AbitoLjeto (COCI21_ljeto)C++14
50 / 50
1 ms204 KiB
#include <iostream> using namespace std; int p[9]; int main() { int t,a,b,ps=0,bs=0,n; cin>>n; for (int i=0;i<n;i++) { cin>>t>>a>>b; if (a>=1 && a<=4) { if (t-p[a]<=10 && p[a]!=0) { ps+=150; p[a]=t; } else { ps+=100; p[a]=t; } } else if (a<=8 && a>=5) { if (t-p[a]<=10 && p[a]!=0) { bs+=150; p[a]=t; } else { bs+=100; p[a]=t; } } } cout<<ps<<' '<<bs; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...