Submission #85500

# Submission time Handle Problem Language Result Execution time Memory
85500 2018-11-20T14:59:53 Z memetkagan44 COCI17_cezar (COCI17_cezar) C++11
45 / 50
3 ms 824 KB
#include<bits/stdc++.h>
using namespace std;
int n,a,sum;
multiset<int> ms;
int main(){
    scanf("%d",&n);
    for(int i=2;i<=11;i++)
        for(int j=1;j<=4;j++)
            ms.insert(i);
    for(int i=1;i<=3;i++)
        for(int j=1;j<=4;j++)
            ms.insert(10);
    for(int i=1;i<=n;i++){
        scanf("%d",&a);
        ms.erase(a);
        sum+=a;
    }
    multiset<int>::iterator q=ms.upper_bound(21-sum);
    int dist=distance(q,ms.end());
    //printf("%d\n",dist);
    printf("%s\n",(52-n-dist)>=dist ? "VUCI" : "DOSTA");
    return 0;
}

Compilation message

cezar.cpp: In function 'int main()':
cezar.cpp:6:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~
cezar.cpp:14:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d",&a);
         ~~~~~^~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 2 ms 252 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 424 KB Output is correct
2 Correct 2 ms 424 KB Output is correct
3 Correct 3 ms 520 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 632 KB Output is correct
2 Correct 2 ms 752 KB Output is correct
3 Correct 2 ms 768 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 768 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 768 KB Output is correct
2 Correct 2 ms 768 KB Output is correct
3 Correct 2 ms 780 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 780 KB Output is correct
2 Correct 2 ms 780 KB Output is correct
3 Correct 3 ms 780 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 780 KB Output is correct
2 Correct 2 ms 780 KB Output is correct
3 Correct 2 ms 780 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 780 KB Output is correct
2 Correct 2 ms 780 KB Output is correct
3 Correct 2 ms 816 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 820 KB Output is correct
2 Correct 2 ms 820 KB Output is correct
3 Correct 2 ms 824 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 824 KB Output is correct
2 Correct 3 ms 824 KB Output is correct
3 Correct 2 ms 824 KB Output is correct