Submission #928987

# Submission time Handle Problem Language Result Execution time Memory
928987 2024-02-17T11:52:42 Z NourWael COCI17_cezar (COCI17_cezar) C++17
50 / 50
1 ms 856 KB
#include <bits/stdc++.h>
#define int long long
using namespace std; 
  int cnt[15];

signed main() {
  
  int n,sum=0; cin>>n;

  for(int i=2; i<=11; i++) cnt[i]+=4;
  cnt[10] += 2*4;
  
  for(int i=0; i<n; i++) {
   int x; cin>>x;
   sum+=x;
   cnt[x]--;
  }
  int x = 21-sum, n1 = 0, n2 = 0;
  for(int i=2; i<=11; i++) {
    if(i>x) n2+=cnt[i];
    else n1+=cnt[i];
  }
  //cout<<sum<<' '<<x<<' '<<n2<<' '<<n1<<' ';
  cout<<(n2>=n1? "DOSTA":"VUCI"); 
  return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 400 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 600 KB Output is correct
2 Correct 1 ms 856 KB Output is correct
3 Correct 0 ms 348 KB Output is correct