Submission #72054

#TimeUsernameProblemLanguageResultExecution timeMemory
72054imsifileJudge Against Wrong Code (FXCUP3_judge)C++98
49 / 100
1545 ms2456 KiB
#include<stdio.h> int X, D, C; int ors[1<<20], usr[1<<20], bm; char st[22], chk[505050]; int main(){ scanf("%d", &X); bm=(1<<X)-1; scanf("%d", &D); for(int i=D; i--;){ scanf("\n%s", st); int su=0; for(int j=0; j<X; j++) if(st[j]=='o') su|=1<<j; ors[su]=su; } scanf("%d", &C); for(int i=C; i--;){ chk[i+1]='x'; scanf("\n%s", st); int su=0; for(int j=0; j<X; j++) if(st[j]=='x') su|=1<<j; usr[su]++; } for(int i=bm; i>=0; i--){ for(int j=0; j<i; j++){ if((i^bm)&j) continue; ors[i] |= ors[j]; usr[i] += usr[j]; } } for(int j=0; j<=bm; j++) if(ors[j]==j) chk[C-usr[bm^j]]='o'; puts(chk+1); return 0; }

Compilation message (stderr)

judge.cpp: In function 'int main()':
judge.cpp:8:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &X); bm=(1<<X)-1;
  ~~~~~^~~~~~~~~~
judge.cpp:9:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &D);
  ~~~~~^~~~~~~~~~
judge.cpp:11:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("\n%s", st);
   ~~~~~^~~~~~~~~~~~
judge.cpp:16:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &C);
  ~~~~~^~~~~~~~~~
judge.cpp:19:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("\n%s", st);
   ~~~~~^~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...