# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
306297 | dolijan | Preokret (COCI19_preokret) | C++14 | 4 ms | 384 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |