Submission #309239

# Submission time Handle Problem Language Result Execution time Memory
309239 2020-10-02T23:52:24 Z ErdosSzekeres Trobojnica (COCI19_trobojnica) C++14
0 / 110
1 ms 384 KB
#include<bits/stdc++.h>
using namespace std;
int freq[3];
int main(){
    int n; cin>>n;
    string s; cin>>s;
    for(char ch : s)freq[ch - '1']++;
    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 -