# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
291054 | 2020-09-04T15:57:28 Z | Autoratch | "The Lyuboyn" code (IZhO19_lyuboyn) | C++14 | 1000 ms | 5752 KB |
#include <bits/stdc++.h> using namespace std; const int N = 1<< 18; int n,k,t,s; string ss; bool used[N]; set<int> r; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cin >> n >> k >> t >> ss; for(int i = 0;i < n;i++) if(ss[i]=='1') s+=(1 << i); cout << (1 << n) << '\n' << ss << '\n'; used[s] = true; for(int i = 1;i < (1 << n);i++) { while(true) { r.clear(); while(r.size()<k) r.insert(rand()%n); int t = s; for(int x : r) t^=(1 << x); if(!used[t]){ s = t; break; } } used[s] = true; for(int j = 0;j < n;j++) cout << (bool)((1 << j)&s); cout << '\n'; } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 512 KB | Ok |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 384 KB | Ok |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1049 ms | 384 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1090 ms | 3968 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 384 KB | Ok |
2 | Execution timed out | 1083 ms | 512 KB | Time limit exceeded |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1091 ms | 5752 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1090 ms | 3968 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1091 ms | 2652 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |