Submission #287874

# Submission time Handle Problem Language Result Execution time Memory
287874 2020-09-01T05:43:55 Z dantoh000 "The Lyuboyn" code (IZhO19_lyuboyn) C++14
14 / 100
661 ms 5468 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 printf("-1\n");
}

Compilation message

lyuboyn.cpp: In function 'int main()':
lyuboyn.cpp:16:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   16 |     scanf("%d%d%d",&n,&k,&t);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~
# 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 Incorrect 1 ms 256 KB Output -1 while solution exists
# Verdict Execution time Memory Grader output
1 Correct 0 ms 256 KB Ok
2 Correct 0 ms 256 KB Ok
3 Correct 1 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 0 ms 256 KB Ok
8 Correct 1 ms 256 KB Ok
# Verdict Execution time Memory Grader output
1 Correct 661 ms 5468 KB Ok
2 Correct 328 ms 2680 KB Ok
3 Correct 4 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 0 ms 256 KB Output -1 while solution exists
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB Output -1 while solution exists
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 661 ms 5468 KB Ok
2 Correct 328 ms 2680 KB Ok
3 Correct 4 ms 384 KB Ok
4 Correct 0 ms 256 KB Ok
5 Correct 1 ms 256 KB Ok
6 Incorrect 0 ms 256 KB Output -1 while solution exists
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 288 KB Output -1 while solution exists
2 Halted 0 ms 0 KB -