Submission #499473

# Submission time Handle Problem Language Result Execution time Memory
499473 2021-12-28T13:28:07 Z Alisaf9 Kamenčići (COCI21_kamencici) C++14
0 / 70
0 ms 296 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]=='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 time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 296 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Incorrect 0 ms 204 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 296 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Incorrect 0 ms 204 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 296 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Incorrect 0 ms 204 KB Output isn't correct