Submission #499473

#TimeUsernameProblemLanguageResultExecution timeMemory
499473Alisaf9Kamenčići (COCI21_kamencici)C++14
0 / 70
0 ms296 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n,k,w=0,q=0,m=0,f=0; string s; cin>>n>>k; cin>>s; for(int i=0;i<n;i++) { if(s[i]=='C') { if(i%2==0) w++; else q++; } } for(int i=n-1;i>=0;i--) { if(s[i]=='C') { if(i%2!=n%2) m++; else f++; } } if(m<f||w<q) cout<<"DA"; else cout<<"NE"; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...