This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |