답안 #306297

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
306297 2020-09-25T07:11:52 Z dolijan Preokret (COCI19_preokret) C++14
20 / 50
4 ms 384 KB
#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;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 1 ms 256 KB Output is partially correct
2 Partially correct 1 ms 256 KB Output is partially correct
3 Partially correct 4 ms 256 KB Output is partially correct
4 Partially correct 1 ms 256 KB Output is partially correct
5 Partially correct 1 ms 384 KB Output is partially correct
6 Partially correct 1 ms 256 KB Output is partially correct
7 Partially correct 1 ms 384 KB Output is partially correct
8 Partially correct 1 ms 256 KB Output is partially correct
9 Partially correct 1 ms 256 KB Output is partially correct
10 Partially correct 1 ms 256 KB Output is partially correct