# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
499480 | 2021-12-28T13:47:11 Z | Alisaf9 | Kamenčići (COCI21_kamencici) | C++14 | 0 ms | 204 KB |
#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]=='P') { q++; } if(s[i]=='C') break; } for(int i=n-1;i>=0;i--) { if(s[i]=='P') { f++; } else break; } m=f+q; if(m%2==1) cout<<"DA"; else cout<<"NE"; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Incorrect | 0 ms | 204 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Incorrect | 0 ms | 204 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Incorrect | 0 ms | 204 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |