답안 #141073

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
141073 2019-08-06T14:16:22 Z 44442 Cezar (COCI17_cezar) C++11
50 / 50
3 ms 380 KB
#include <bits/stdc++.h>
using namespace std;
int n,a[55],b,ok,c;
int main (){
ios::sync_with_stdio(0);
      scanf("%d",&n);
      for(int i=0;i<n;i++){
      	 scanf("\n%d",&a[i]);
      	 b=b+a[i];
      }
      ok=21-b;
      if(ok<10)
         c=(ok-1)*4;
      else if(ok==11)
         c=52;
      else
         c=48;
      for(int i=0;i<n;i++){
      	  if(a[i]<=ok)
      	     c--;
	  }
	  if(c<(52-n)/2)
	     printf("DOSTA");
	  else
	     printf("VUCI");
      
return 0;
}

Compilation message

cezar.cpp: In function 'int main()':
cezar.cpp:6:12: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
       scanf("%d",&n);
       ~~~~~^~~~~~~~~
cezar.cpp:8:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("\n%d",&a[i]);
         ~~~~~^~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 3 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 380 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 260 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 348 KB Output is correct
3 Correct 2 ms 376 KB Output is correct