답안 #339789

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
339789 2020-12-26T08:16:18 Z ammar2000 Cezar (COCI17_cezar) C++17
45 / 50
1 ms 372 KB
#include <bits/stdc++.h>
#define int long long
using namespace std;
int n,in,fs,ss,cs,ty=11;
map <int ,int >mp;
main()
{
    for (int i=1;i<=11;i++)
    {
        if (i==10)
            mp[i]=16;
        else mp[i]=4;
    }
    cin>>n;
    while (n--)
    {
        cin>>in;
        cs+=in;
        mp[in]++;
    }
    int x=21-cs;
    for (int i=1;i<=min(x,ty);i++)
        fs+=mp[i];
    for (int i=x+1;i<=11;i++)
        ss+=mp[i];
    if (fs<=ss)
      cout <<"DOSTA";
      else
        cout <<"VUCI";
    return 0;
}

Compilation message

cezar.cpp:6:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    6 | main()
      |      ^
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 372 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 256 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct