Submission #1089486

# Submission time Handle Problem Language Result Execution time Memory
1089486 2024-09-16T15:22:17 Z Szil Trobojnica (COCI19_trobojnica) C++17
0 / 110
1 ms 344 KB
#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";
    }
}

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 344 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -