Submission #138856

# Submission time Handle Problem Language Result Execution time Memory
138856 2019-07-30T14:39:12 Z vladciuperceanu COCI17_cezar (COCI17_cezar) C++14
50 / 50
3 ms 376 KB
#include <iostream>

using namespace std;

int n,i,x,f[15];

int main()
{
    cin >> n;
    for (i=2; i<=11; i++)
        f[i] = 4;
    f[10] = 16;
    int s = 0;
    for (i=1; i<=n; i++)
    {
        cin >> x;
        s += x;
        f[x]--;
    }
    int val = 21-s;
    int nr1 = 0; int nr2 = 0;
    for (i=val+1; i<=11; i++)
        nr1 += f[i];
    for (i=2; i<=val; i++)
        nr2 += f[i];
    if (nr1 >= nr2)
        cout << "DOSTA";
    else
        cout << "VUCI";
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 128 KB Output is correct
# Verdict Execution time Memory 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
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 3 ms 256 KB Output is correct
# Verdict Execution time Memory 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
# Verdict Execution time Memory 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
# Verdict Execution time Memory 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
# Verdict Execution time Memory 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
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory 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