Submission #309238

# Submission time Handle Problem Language Result Execution time Memory
309238 2020-10-02T23:50:43 Z ErdosSzekeres Trobojnica (COCI19_trobojnica) C++14
0 / 110
1 ms 384 KB
#include<bits/stdc++.h>
using namespace std;
int main(){
    int n; cin>>n;
    string s; cin>>s;
    int freq[3];
    for(char ch : s)freq[ch-'a']++;
    bool poss = true;
    for(int i=0; i<3; i++){
        if(freq[i]==n)poss=false;
        if(freq[i]%2 != n%2)poss=false;
    }
    if(poss)cout<<"DA"<<endl;
    else cout<<"NE"<<endl;
    for(int i=1; i<=n-3; i++)cout<<"1 1 1"<<endl;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -