# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
287921 | 2020-09-01T06:47:26 Z | dantoh000 | "The Lyuboyn" code (IZhO19_lyuboyn) | C++14 | 646 ms | 5304 KB |
#include <bits/stdc++.h> using namespace std; int n,k,t; string s; string bin(int x){ string ret = ""; for (int i = n-1; i >= 0; i--){ if (x>>i&1){ ret+="1"; } else ret +="0"; } return ret; } int main() { scanf("%d%d%d",&n,&k,&t); cin >> s; if (k == 1){ printf("%d\n",(1<<n)); for (int i = 0; i < (1<<n); i++){ cout << bin(i^(i>>1)) << endl; } } else if (k%2 == 0){ printf("-1\n"); } else if (k == 3){ printf("%d\n",(1<<n)); for (int i = 0; i < (1<<n); i++){ int ans = i^(i>>1); if (i&1) ans ^= ((1<<n)-1); cout << bin(ans) << endl; } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | First number in answer is not x 1 0 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 256 KB | Ok |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 256 KB | Ok |
2 | Correct | 0 ms | 256 KB | Ok |
3 | Correct | 0 ms | 256 KB | Ok |
4 | Correct | 0 ms | 256 KB | Ok |
5 | Correct | 0 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 | Correct | 646 ms | 5304 KB | Ok |
2 | Correct | 328 ms | 2808 KB | Ok |
3 | Correct | 3 ms | 384 KB | Ok |
4 | Correct | 0 ms | 256 KB | Ok |
5 | Correct | 1 ms | 256 KB | Ok |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | The values in the output sequence are not pairwise distinct! |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 646 ms | 5304 KB | Ok |
2 | Correct | 328 ms | 2808 KB | Ok |
3 | Correct | 3 ms | 384 KB | Ok |
4 | Correct | 0 ms | 256 KB | Ok |
5 | Correct | 1 ms | 256 KB | Ok |
6 | Incorrect | 1 ms | 256 KB | The values in the output sequence are not pairwise distinct! |
7 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 256 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |