#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];
int X;
X = (sr == N-1 ? 0 : 1);
for(int i=1; i<=N; i++){
if(row[i] == X) dr=i;
}
X = (sc == N-1 ? 0 : 1);
for(int i=1; i<=N; i++){
if(col[i] == X) dc=i;
}
Report(dr, dc);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Correct : C = 6 |
2 |
Correct |
2 ms |
376 KB |
Correct : C = 6 |
3 |
Partially correct |
3 ms |
376 KB |
Partially correct : C = 198 |
4 |
Partially correct |
3 ms |
376 KB |
Partially correct : C = 198 |
5 |
Partially correct |
3 ms |
376 KB |
Partially correct : C = 200 |
6 |
Partially correct |
3 ms |
376 KB |
Partially correct : C = 200 |
7 |
Partially correct |
3 ms |
380 KB |
Partially correct : C = 198 |
8 |
Partially correct |
3 ms |
376 KB |
Partially correct : C = 200 |
9 |
Partially correct |
3 ms |
376 KB |
Partially correct : C = 200 |
10 |
Partially correct |
3 ms |
376 KB |
Partially correct : C = 200 |
11 |
Partially correct |
3 ms |
376 KB |
Partially correct : C = 200 |
12 |
Partially correct |
3 ms |
376 KB |
Partially correct : C = 198 |