Submission #69019

#TimeUsernameProblemLanguageResultExecution timeMemory
69019imsifileJudge Against Wrong Code (FXCUP3_judge)C11
100 / 100
446 ms9964 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=0; i<X; i++){ for(int j=0; j<=bm; j++){ if(j&(1<<i)) continue; ors[j^(1<<i)] |= ors[j]; usr[j^(1<<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.c: In function 'main':
judge.c:8:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &X); bm=(1<<X)-1;
  ^~~~~~~~~~~~~~~
judge.c:9:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &D);
  ^~~~~~~~~~~~~~~
judge.c:11:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   scanf("\n%s", st);
   ^~~~~~~~~~~~~~~~~
judge.c:16:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &C);
  ^~~~~~~~~~~~~~~
judge.c:19:3: warning: ignoring return value of 'scanf', 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...