Submission #418305

#TimeUsernameProblemLanguageResultExecution timeMemory
418305dolphingarlicCheerleaders (info1cup20_cheerleaders)C++14
21 / 100
14 ms868 KiB
#include <bits/stdc++.h> typedef long long ll; using namespace std; int h[1 << 17]; int main() { cin.tie(0)->sync_with_stdio(0); int n; cin >> n; for (int i = 0; i < (1 << n); i++) cin >> h[i]; cout << 0 << '\n'; int zero_pos = find(h, h + (1 << n), 0) - h; int one_pos = find(h, h + (1 << n), 1) - h; for (int i = 0; i < n; i++) { cout << 2; if (zero_pos & (1 << i)) cout << 1; } for (int j = 0; j < __builtin_ctz(one_pos ^ zero_pos); j++) cout << 2; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...