Submission #1152598

#TimeUsernameProblemLanguageResultExecution timeMemory
1152598justin271828Trobojnica (COCI19_trobojnica)C++20
0 / 110
0 ms320 KiB
#include <bits/stdc++.h> using namespace std; #define l2 long long int main() { int n; cin >> n; string s; cin >> s; int one = 0; int two = 0; int three = 0; for (char c: s) { if (c == '1') one++; else if (c == '2') two++; else three++; } int a = one+two-three-three; int b = one+three-two-two; int c = two+three-one-one; if (a == b && b == c) { cout << "DA\n"; for (int i = 3; i < n; i++) cout << 1 << " " << 2 << " " << 3 << "\n"; } else cout << "NE"; return 0;}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...