답안 #139213

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
139213 2019-07-31T12:02:33 Z AlexPascu007 Cezar (COCI17_cezar) C++
50 / 50
2 ms 380 KB
#include <iostream>
using namespace std;
int n,s,st,dr,v[60],c[20],i,dif;
int main() {
    for (i=2;i<=9;i++)
        c[i]=4; //cate carti
    c[10]=16;   //din fiecare
    c[11]=4;    //fel sunt
    cin>>n;
    for (i=1;i<=n;i++) {
        cin>>v[i];
        s+=v[i];
    }
    dif=21-s;
    if (dif==0||dif==1) {
        cout<<"DOSTA";
        return 0;
    }
    for (i=1;i<=n;i++)
        c[v[i]]--;
    for (i=2;i<=dif;i++)
        st+=c[i];
    for (i=dif+1;i<=11;i++)
        dr+=c[i];
    if (st>=dr)
        cout<<"VUCI";
    else
        cout<<"DOSTA";
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 380 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 256 KB Output is correct