# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
290931 | 2020-09-04T14:48:00 Z | Plurm | "The Lyuboyn" code (IZhO19_lyuboyn) | C++11 | 1000 ms | 25684 KB |
#include <bits/stdc++.h> using namespace std; int lsb[300005]; int rmp[300005]; set<string> s; int main(){ int n,k,t; scanf("%d%d%d",&n,&k,&t); if(k % 2 == 0 || k >= n){ printf("-1\n"); return 0; } for(int i = 0; i <= 18; i++) rmp[1 << i] = i; printf("%d\n", 1 << n); char bs[32]; scanf("%s",bs); if(strlen(bs) != n) while(true); int parsed = 0; for(int i = 0; i < n; i++){ parsed *= 2; parsed += bs[i] == '1' ? 1 : 0; } printf("%s\n",bs); s.insert(bs); for(int i = 1; i < (1 << n); i++){ int bit = rmp[i & -i]; int toggidx = bit; toggidx = n-toggidx-1; bs[toggidx] = '0'+'1'-bs[toggidx]; bs[toggidx == 0 ? 1 : 0] = '0'+'1'-bs[0]; bs[toggidx == 0 ? 2 : toggidx == 1 ? 2 : 1] = '0'+'1'-bs[1]; if(s.count(bs)) while(true); s.insert(bs); printf("%s\n",bs); } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1077 ms | 384 KB | Time limit exceeded |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1063 ms | 384 KB | Time limit exceeded |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 384 KB | Ok |
2 | Correct | 0 ms | 256 KB | Ok |
3 | Correct | 0 ms | 384 KB | Ok |
4 | Correct | 0 ms | 384 KB | Ok |
5 | Correct | 0 ms | 256 KB | Ok |
6 | Correct | 0 ms | 256 KB | Ok |
7 | Correct | 0 ms | 256 KB | Ok |
8 | Correct | 1 ms | 384 KB | Ok |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1097 ms | 25684 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1098 ms | 384 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1092 ms | 8824 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1097 ms | 25684 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1096 ms | 4600 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |