Submission #65250

# Submission time Handle Problem Language Result Execution time Memory
65250 2018-08-07T07:46:58 Z 검수컵(#1978, imsifile) Magic Dowsing (FXCUP3_magic) C++
0 / 100
2 ms 256 KB
#include "dowsing.h"

int row[111], sr, col[111], sc, dr, dc;

void FindTreasure(int N) {
	for(int i=1; i<=N; i++) row[i] = Detect(i,1), sr += row[i];
	for(int i=1; i<=N; i++) col[i] = Detect(1,i), sc += col[i];
	for(int i=2; i<=N; i++){
		if(row[i] == 1) dr=i;
	}
	if(sc == N-1) dr=1;
	for(int i=2; i<=N; i++){
		if(col[i] == 1) dc=i;
	}
	if(sr == N-1) dc=1;
	Report(dr, dc);
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Correct : C = 6
2 Runtime error 2 ms 256 KB Execution failed because the return code was nonzero
3 Halted 0 ms 0 KB -