Submission #72040

#TimeUsernameProblemLanguageResultExecution timeMemory
72040BBBSNG (#118)Judge Against Wrong Code (FXCUP3_judge)C++17
0 / 100
2 ms376 KiB
#include <bits/stdc++.h> using namespace std; int K[1101010], F[33]; bool ans[505050]; int k, n, m; int main() { int i, j, s; char str[33]; scanf("%d", &k); scanf("%d", &n); for(i=1; i<=n; i++){ scanf("%s", str); for(s=0, j=0; j<k; j++){ if(str[j] != '.') s |= (1 << j); } K[s] |= s; } scanf("%d", &m); for(i=1; i<=m; i++){ scanf("%s", str); for(s=0, j=0; j<k; j++){ if(str[j] != '.') F[j] ++; } } for(i=0; i<(1<<k); i++){ int cnt = 0; for(j=0; j<k; j++){ if(i & (1 << j)){ K[i] |= K[i - (1 << j)]; cnt += F[j]; } } if(K[i] == i) ans[cnt] = 1; } for(i=1; i<=m; i++){ printf("%c", ans[i]? 'O':'X'); } printf("\n"); return 0; }

Compilation message (stderr)

judge.cpp: In function 'int main()':
judge.cpp:14:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &k);
  ~~~~~^~~~~~~~~~
judge.cpp:16:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &n);
  ~~~~~^~~~~~~~~~
judge.cpp:19:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%s", str);
   ~~~~~^~~~~~~~~~~
judge.cpp:28:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &m);
  ~~~~~^~~~~~~~~~
judge.cpp:31:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%s", str);
   ~~~~~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...