#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int cnt[3];
void solve() {
int n; cin >> n;
for (int i = 0; i < n; i++) {
char c; cin >> c;
cnt[c-'1']++;
}
int zeros = 0;
zeros += cnt[0] == 0;
zeros += cnt[1] == 0;
zeros += cnt[2] == 0;
if (zeros > 1 || cnt[0] % 2 != cnt[1] % 2 || cnt[1] % 2 != cnt[2] % 2) {
cout << "NE\n";
} else {
cout << "DA\n";
for (int i = 0; i < n-3; i++) {
cout << "1 1 1\n";
}
}
}
int main() {
ios_base::sync_with_stdio(0); cin.tie(0);
int t = 1;
// cin >> t;
while (t--) {
solve();
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |