# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
212397 | 2020-03-22T21:35:49 Z | chubyxdxd | COCI17_cezar (COCI17_cezar) | C++11 | 6 ms | 512 KB |
#include <bits/stdc++.h> #define all(a) a.begin(),a.end() #define allr(a) a.rbegin(),a.rend() #define F first #define S second #define INF 3000000000 #define inf -10000000 #define pb push_back #define forr(i,p,n) for(int i=p;i<n;i++) #define mpk make_pair #define upb(a,s) upper_bound(a.begin(),a.end(),s) #define lwb(a,s) lower_bound(a.begin(),a.end(),s) #define D(x) cout << #x " = " << (x) << endl #define mem(a,val) memset(a,val,sizeof a) #define ulti(a) for(int i=0;i<a.size();i++)cout<<a[i]<<" " using namespace std; typedef long long ll; typedef pair<ll,ll> ii; typedef vector<ii> vii; typedef vector<ll> vi; typedef vector<vi> vvi; //priority_queue<ll> pq; ll gcd(ll a,ll b){ if(a%b==0)return b; return gcd(b,a%b); } bool pal(string s){ ll j=s.size()-1; ll sw=0; for(ll i=0;i<s.size()/2;i++){ if(s[i]!=s[j]){sw=1;break;}j--;} if(sw)return false; else return true; } int main() { ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(); ll a,b,c,d,n,t,m,k; cin>>n; int v[12]; for(int i=2;i<=9;i++){ v[i]=4; } v[10]=16; v[11]=4; ll sum=0; forr(i,0,n){ cin>>a; sum+=a; v[a]--; } a=abs(21-sum); ll cnt=0,cnt1=0; forr(i,2,12){ if(i>a)cnt+=v[i]; else cnt1+=v[i]; } //cout<<cnt<<" "<<cnt1<<endl; if(cnt>=cnt1)cout<<"DOSTA"<<endl; else cout<<"VUCI"<<endl; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 384 KB | Output is correct |
2 | Correct | 4 ms | 384 KB | Output is correct |
3 | Correct | 5 ms | 384 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 384 KB | Output is correct |
2 | Correct | 5 ms | 384 KB | Output is correct |
3 | Correct | 5 ms | 384 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 384 KB | Output is correct |
2 | Correct | 5 ms | 384 KB | Output is correct |
3 | Correct | 5 ms | 384 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 384 KB | Output is correct |
2 | Correct | 4 ms | 384 KB | Output is correct |
3 | Correct | 5 ms | 512 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 384 KB | Output is correct |
2 | Correct | 5 ms | 392 KB | Output is correct |
3 | Correct | 6 ms | 384 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 384 KB | Output is correct |
2 | Correct | 5 ms | 384 KB | Output is correct |
3 | Correct | 5 ms | 384 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 384 KB | Output is correct |
2 | Correct | 5 ms | 384 KB | Output is correct |
3 | Correct | 5 ms | 384 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 432 KB | Output is correct |
2 | Correct | 5 ms | 384 KB | Output is correct |
3 | Correct | 5 ms | 384 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 384 KB | Output is correct |
2 | Correct | 5 ms | 384 KB | Output is correct |
3 | Correct | 5 ms | 384 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 384 KB | Output is correct |
2 | Correct | 5 ms | 384 KB | Output is correct |
3 | Correct | 5 ms | 384 KB | Output is correct |