Submission #200892

# Submission time Handle Problem Language Result Execution time Memory
200892 2020-02-08T12:15:11 Z SamAnd COCI17_cezar (COCI17_cezar) C++17
50 / 50
6 ms 504 KB
#include <bits/stdc++.h>
using namespace std;
const int N = 55;

int n;
int a[N];

int q[N];

int main()
{
    for (int i = 2; i <= 10; ++i)
        q[i] = 4;
    q[10] += 12;
    q[11] = 4;
    scanf("%d", &n);
    int x = 0;
    for (int i = 1; i <= n; ++i)
    {
        scanf("%d", &a[i]);
        x += a[i];
        --q[a[i]];
    }
    x = (21 - x);
    int q1 = 0;
    for (int i = 2; i <= x; ++i)
        q1 += q[i];
    int q2 = 0;
    for (int i = x + 1; i <= 11; ++i)
        q2 += q[i];
    if (q1 > q2)
        printf("VUCI\n");
    else
        printf("DOSTA\n");
    return 0;
}

Compilation message

cezar.cpp: In function 'int main()':
cezar.cpp:16:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", &n);
     ~~~~~^~~~~~~~~~
cezar.cpp:20:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d", &a[i]);
         ~~~~~^~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 5 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 376 KB Output is correct
2 Correct 5 ms 376 KB Output is correct
3 Correct 5 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 504 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 5 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 376 KB Output is correct
2 Correct 5 ms 376 KB Output is correct
3 Correct 5 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 376 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 6 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 376 KB Output is correct
3 Correct 5 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 5 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 376 KB Output is correct
3 Correct 5 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 5 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 376 KB Output is correct
2 Correct 5 ms 376 KB Output is correct
3 Correct 5 ms 256 KB Output is correct