Submission #1089486

#TimeUsernameProblemLanguageResultExecution timeMemory
1089486SzilTrobojnica (COCI19_trobojnica)C++17
0 / 110
1 ms344 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...