답안 #500029

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
500029 2021-12-30T09:42:36 Z kappa Cezar (COCI17_cezar) C++14
45 / 50
1 ms 292 KB
#include <bits/stdc++.h>

using namespace std;

int n, sum, need, a, b;

map<int,int> create()
{
  map<int,int> m;
  m[1] = 4, m[2] = 4, m[3] = 4, m[4] = 4, m[5] = 4, m[6] = 4, m[7] = 4, m[8] = 4, m[9] = 4, m[10] = 12, m[11] = 4;
  return m;
}

map<int, int> m = create();

int main(){
    cin >> n;

    for (int i = 0; i < n; i++)
    {
        int temp;
        cin >> temp;
        sum += temp;
        m[temp]--;
    }

    need = 21 - sum;

    for (int i = 1; i <= 11; i++)
    {
        if(i <= need){
            a += m[i];
        }
        else{
            b += m[i];
        }
    }

    a > b ? cout << "VUCI" : cout << "DOSTA";
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 272 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 292 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct