Submission #871664

#TimeUsernameProblemLanguageResultExecution timeMemory
871664vjudge1Trobojnica (COCI19_trobojnica)C++17
0 / 110
0 ms348 KiB
//author: Ahmet Alp Orakci #include <bits/stdc++.h> using namespace std; using i64 = long long; #define ONLINE_JUDGE void solve() { int n; cin >> n; string s; cin >> s; int arr[3] {}; for(char &ch : s) arr[ch - '1']++; if(arr[0] % 2 != arr[1] % 2 || arr[1] % 2 != arr[2] % 2 || arr[2] % 2 != arr[0] % 2) { cout << "NE"; return; } cout << "DA"; return; } signed main() { #ifndef ONLINE_JUDGE freopen(".in", "r", stdin); freopen(".out", "w", stdout); #endif ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int t = 1; //cin >> t; for(int i = 1; i <= t; i++) { solve(); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...