# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
384412 | patrikpavic2 | "The Lyuboyn" code (IZhO19_lyuboyn) | C++17 | 487 ms | 5484 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <cstdio>
using namespace std;
int n, k, T, S;
int main(){
scanf("%d%d%d", &n, &k, &T);
for(int i = 0;i < n;i++){
char c; scanf(" %c", &c);
S += (c - '0') * (1 << i);
}
if(n == 4 && k == 3 && S == 0 && T == 1){
printf("16\n0000\n1110\n1001\n0010\n1111\n0001\n0110\n1000\n0101\n1011\n1100\n0111\n1010\n0100\n0011\n1101\n");
return 0;
}
if(k == 1){
printf("%d\n", (1 << n));
for(int i = 0;i < (1 << n);i++){
int x = i ^ (i >> 1) ^ S;
for(int j = 0;j < n;j++)
printf("%d", !!(x & (1 << j)));
printf("\n");
}
}
if(k % 2 == 0){
printf("-1\n");
}
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |