Submission #68993

# Submission time Handle Problem Language Result Execution time Memory
68993 2018-08-19T12:20:14 Z imsifile Judge Against Wrong Code (FXCUP3_judge) C
0 / 100
2 ms 248 KB
#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]=='.') 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

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 time Memory Grader output
1 Incorrect 2 ms 248 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 248 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 248 KB Output isn't correct
2 Halted 0 ms 0 KB -