답안 #140255

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
140255 2019-08-02T11:33:01 Z SeekingOblivion Cezar (COCI17_cezar) C++14
50 / 50
3 ms 504 KB
#include<iostream>
#include<fstream>
#define fin cin
#define fout cout
#include<vector>
using namespace std;
//ifstream fin("date.in");
//ofstream fout("date.out");
int n,a,x,i,f[12],sol;
int main(){
    fin>>n;x=21;
    for(i=1;i<=n;i++)
    {
        fin>>a;
        f[a]++;
        x-=a;
    }
    for(i=2;i<=9;i++) if(i<=x) sol+=4-f[i]; else sol-=4-f[i];
    if(x==10) sol+=16-f[10]; else sol-=16-f[10];
    if(x==11) sol+=4-f[11]; else sol-=4-f[11];
    if(sol>0) fout<<"VUCI";
    else fout<<"DOSTA";
    return 0;
}
# 결과 실행 시간 메모리 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 376 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 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 3 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 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 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 504 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