Submission #212397

#TimeUsernameProblemLanguageResultExecution timeMemory
212397chubyxdxdCOCI17_cezar (COCI17_cezar)C++11
50 / 50
6 ms512 KiB
#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 (stderr)

cezar.cpp: In function 'bool pal(std::__cxx11::string)':
cezar.cpp:30:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(ll i=0;i<s.size()/2;i++){
              ~^~~~~~~~~~~
cezar.cpp: In function 'int main()':
cezar.cpp:38:10: warning: unused variable 'b' [-Wunused-variable]
     ll a,b,c,d,n,t,m,k;
          ^
cezar.cpp:38:12: warning: unused variable 'c' [-Wunused-variable]
     ll a,b,c,d,n,t,m,k;
            ^
cezar.cpp:38:14: warning: unused variable 'd' [-Wunused-variable]
     ll a,b,c,d,n,t,m,k;
              ^
cezar.cpp:38:18: warning: unused variable 't' [-Wunused-variable]
     ll a,b,c,d,n,t,m,k;
                  ^
cezar.cpp:38:20: warning: unused variable 'm' [-Wunused-variable]
     ll a,b,c,d,n,t,m,k;
                    ^
cezar.cpp:38:22: warning: unused variable 'k' [-Wunused-variable]
     ll a,b,c,d,n,t,m,k;
                      ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...