#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 |
- |