Submission #306297

#TimeUsernameProblemLanguageResultExecution timeMemory
306297dolijanPreokret (COCI19_preokret)C++14
20 / 50
4 ms384 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int a=0,b=0; int ties=0; for(int i=0;i<n;i++) { if(a==b) ties++; int gol; cin>>gol; if(gol==1) a++; else b++; } if(a==b) ties++; cout<<a<<" "<<b<<endl; cout<<ties<<endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...