# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
290890 | 2020-09-04T14:20:35 Z | Plurm | "The Lyuboyn" code (IZhO19_lyuboyn) | C++11 | 52 ms | 5368 KB |
#include <bits/stdc++.h> using namespace std; int lsb[300005]; int main(){ int n,k,t; scanf("%d%d%d",&n,&k,&t); if(k % 2 == 0){ printf("-1\n"); return 0; } char bs[32]; scanf("%s",bs); int parsed = 0; for(int i = 0; i < n; i++){ parsed *= 2; parsed += bs[i] == '1' ? 1 : 0; } printf("%s\n",bs); for(int i = 1; i < (1 << n); i++){ int bit = i & -i; for(int j = 0; j < k; j++){ int toggidx = (bit+j) % n; bs[n-toggidx-1] = '0'+'1'-bs[n-toggidx-1]; } printf("%s\n",bs); } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | The output is neither -1 nor the length of the answer |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 256 KB | Expected integer, but "0000" found |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 256 KB | Ok |
2 | Correct | 1 ms | 384 KB | Ok |
3 | Correct | 0 ms | 256 KB | Ok |
4 | Correct | 1 ms | 256 KB | Ok |
5 | Correct | 1 ms | 256 KB | Ok |
6 | Correct | 1 ms | 256 KB | Ok |
7 | Correct | 1 ms | 256 KB | Ok |
8 | Correct | 0 ms | 256 KB | Ok |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 35 ms | 5368 KB | Expected integer, but "000000000000000000" found |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 256 KB | Expected integer, but "0000000" found |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 52 ms | 5368 KB | Expected integer, but "010101010011010100" found |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 35 ms | 5368 KB | Expected integer, but "000000000000000000" found |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 27 ms | 2688 KB | Expected integer, but "01011001010101101" found |
2 | Halted | 0 ms | 0 KB | - |