Submission #69013

# Submission time Handle Problem Language Result Execution time Memory
69013 2018-08-19T13:22:05 Z 검수컵(#1978, imsifile) Judge Against Wrong Code (FXCUP3_judge) C++
10 / 100
1500 ms 2968 KB
#include<stdio.h>

int X, D, C, dt[505050], cd[505050];
char st[22], chk[505050];

void dfs(int ix, int ors){
	if(ix == D){
		int cnt=0;
		for(int i=C; i--;) if(cd[i]&ors) cnt++;
		chk[cnt]='o';
		return;
	}
	dfs(ix+1, ors);
	dfs(ix+1, ors|dt[ix]);
}

int main(){
	scanf("%d", &X);
	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;
		dt[i]=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;
		cd[i]=su;
	}
	dfs(0, 0);
	puts(chk+1);
	return 0;
}

Compilation message

judge.cpp: In function 'int main()':
judge.cpp:18:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &X);
  ~~~~~^~~~~~~~~~
judge.cpp:19:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &D);
  ~~~~~^~~~~~~~~~
judge.cpp:21:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("\n%s", st);
   ~~~~~^~~~~~~~~~~~
judge.cpp:26:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &C);
  ~~~~~^~~~~~~~~~
judge.cpp:29:8: warning: ignoring return value of 'int scanf(const char*, ...)', 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 3 ms 432 KB Output is correct
5 Correct 3 ms 468 KB Output is correct
6 Correct 4 ms 552 KB Output is correct
7 Correct 2 ms 572 KB Output is correct
8 Correct 4 ms 572 KB Output is correct
9 Correct 2 ms 572 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 3 ms 432 KB Output is correct
5 Correct 3 ms 468 KB Output is correct
6 Correct 4 ms 552 KB Output is correct
7 Correct 2 ms 572 KB Output is correct
8 Correct 4 ms 572 KB Output is correct
9 Correct 2 ms 572 KB Output is correct
10 Execution timed out 1556 ms 2968 KB Time limit exceeded
11 Halted 0 ms 0 KB -
# 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 3 ms 432 KB Output is correct
5 Correct 3 ms 468 KB Output is correct
6 Correct 4 ms 552 KB Output is correct
7 Correct 2 ms 572 KB Output is correct
8 Correct 4 ms 572 KB Output is correct
9 Correct 2 ms 572 KB Output is correct
10 Execution timed out 1556 ms 2968 KB Time limit exceeded
11 Halted 0 ms 0 KB -