제출 #392999

#제출 시각아이디문제언어결과실행 시간메모리
392999patrikpavic2"The Lyuboyn" code (IZhO19_lyuboyn)C++17
19 / 100
330 ms5292 KiB
#include <cstdio> using namespace std; const int N = 20; int n, k, bla, bs[N]; int main(){ scanf("%d%d%d", &n, &k, &bla); int poc = 0; for(int i = 0;i < n;i++){ char c; scanf(" %c", &c); poc += (c & 1) << i; } if(!(k & 1)){ printf("-1\n"); return 0; } for(int i = 0;i < n;i++){ for(int j = 0;j < k;j++) bs[i] += 1 << ((i + j) % n); } printf("%d\n", (1 << n)); for(int i = 0;i < (1 << n);i++){ int cur = poc; for(int j = 0;j < n;j++) if((i ^ (i >> 1)) & (1 << j)) cur ^= bs[j]; for(int j = 0;j < n;j++) printf("%c", 48 + ((cur >> j) & 1)); printf("\n"); } return 0; }

컴파일 시 표준 에러 (stderr) 메시지

lyuboyn.cpp: In function 'int main()':
lyuboyn.cpp:10:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   10 |  scanf("%d%d%d", &n, &k, &bla);
      |  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
lyuboyn.cpp:13:16: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   13 |   char c; scanf(" %c", &c);
      |           ~~~~~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...