Submission #71991

# Submission time Handle Problem Language Result Execution time Memory
71991 2018-08-26T04:31:07 Z 우리는 진실을 잊고 살잖아~~~(#2195, leejseo, king114) Magic Dowsing (FXCUP3_magic) C++11
0 / 100
2 ms 256 KB
#include "dowsing.h"

bool B[101][101];

void FindTreasure(int N) {
	int i, tmp = 0, ai, aj;
	for (i=1; i<=N; i++){
		B[1][i] = Detect(1, i);
		if (B[1][i]) ++tmp;
		if (i > 1 && tmp == 1) break;
		if (tmp > 1) break;
	}
	if (tmp == 1){
		if (B[1][1]) aj = 1;
		else aj = i;
		for (i=1; i<=N; i++){
			if (!Detect(i, aj)) return Report(i, aj);
		}
	}
	else{
		ai = 1;
		for (i=1; i<=N; i++){
			if (!Detect(ai, i)) return Report(ai, i);
		}
	}
}
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 256 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -