#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll
int n,a,b,c;
char arr[200005];
signed main(){
ios::sync_with_stdio(false);
cin.tie(NULL);
cin >> n;
for(int i=1;i<=n;i++){
cin >> arr[i];
if(arr[i]=='1'){
a++;
}
else if(arr[i]=='2'){
b++;
}
else if(arr[i]=='3'){
c++;
}
}
if(a%2==b%2 and b%2==c%2){
cout << "DA" << "\n";
for(int i=1;i<=n-3;i++){
cout << "1 1 1" << "\n";
}
}
else{
cout << "NE" << "\n";
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |