Submission #69019

# Submission time Handle Problem Language Result Execution time Memory
69019 2018-08-19T13:37:02 Z imsifile Judge Against Wrong Code (FXCUP3_judge) C
100 / 100
446 ms 9964 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]=='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

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 Correct 2 ms 248 KB Output is correct
2 Correct 2 ms 356 KB Output is correct
3 Correct 3 ms 356 KB Output is correct
4 Correct 5 ms 688 KB Output is correct
5 Correct 3 ms 816 KB Output is correct
6 Correct 4 ms 816 KB Output is correct
7 Correct 4 ms 956 KB Output is correct
8 Correct 4 ms 956 KB Output is correct
9 Correct 5 ms 956 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 2 ms 356 KB Output is correct
3 Correct 3 ms 356 KB Output is correct
4 Correct 5 ms 688 KB Output is correct
5 Correct 3 ms 816 KB Output is correct
6 Correct 4 ms 816 KB Output is correct
7 Correct 4 ms 956 KB Output is correct
8 Correct 4 ms 956 KB Output is correct
9 Correct 5 ms 956 KB Output is correct
10 Correct 90 ms 1508 KB Output is correct
11 Correct 65 ms 1508 KB Output is correct
12 Correct 15 ms 1508 KB Output is correct
13 Correct 3 ms 1508 KB Output is correct
14 Correct 124 ms 1508 KB Output is correct
15 Correct 152 ms 1820 KB Output is correct
16 Correct 274 ms 1964 KB Output is correct
17 Correct 239 ms 1964 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 2 ms 356 KB Output is correct
3 Correct 3 ms 356 KB Output is correct
4 Correct 5 ms 688 KB Output is correct
5 Correct 3 ms 816 KB Output is correct
6 Correct 4 ms 816 KB Output is correct
7 Correct 4 ms 956 KB Output is correct
8 Correct 4 ms 956 KB Output is correct
9 Correct 5 ms 956 KB Output is correct
10 Correct 90 ms 1508 KB Output is correct
11 Correct 65 ms 1508 KB Output is correct
12 Correct 15 ms 1508 KB Output is correct
13 Correct 3 ms 1508 KB Output is correct
14 Correct 124 ms 1508 KB Output is correct
15 Correct 152 ms 1820 KB Output is correct
16 Correct 274 ms 1964 KB Output is correct
17 Correct 239 ms 1964 KB Output is correct
18 Correct 186 ms 3212 KB Output is correct
19 Correct 142 ms 4788 KB Output is correct
20 Correct 273 ms 9964 KB Output is correct
21 Correct 182 ms 9964 KB Output is correct
22 Correct 409 ms 9964 KB Output is correct
23 Correct 446 ms 9964 KB Output is correct