답안 #141689

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
141689 2019-08-08T21:58:48 Z denmircea Cezar (COCI17_cezar) C++14
50 / 50
2 ms 380 KB
#include <iostream>

using namespace std;
int f[12], n, i, x, X, s1, s2, sum;
int main () {

    for (i=2;i<=11;i++)
        f[i] = 4;
    f[10] = 16;
    cin>>n;
    for (i=1;i<=n;i++) {
        cin>>x;
        sum += x;
        f[x] --;
    }
    X = 21-sum;

    for (i=2;i<=X;i++)
        s1 += f[i];
    for (i=X+1;i<=11;i++)
        s2 += f[i];
    if (s2 >= s1)
        cout<<"DOSTA\n";
    else
        cout<<"VUCI\n";

}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 380 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 380 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 348 KB Output is correct
3 Correct 2 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 360 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 256 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 252 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 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 376 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 276 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 256 KB Output is correct