Submission #309238

#TimeUsernameProblemLanguageResultExecution timeMemory
309238ErdosSzekeresTrobojnica (COCI19_trobojnica)C++14
0 / 110
1 ms384 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...