# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
72007 | 우리는 진실을 잊고 살잖아~~~ (#118) | Magic Dowsing (FXCUP3_magic) | C++17 | 4 ms | 376 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "dowsing.h"
//#include <iostream>
//using namespace std;
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 > 2 && tmp == 1) break;
if (tmp > 1) break;
}
if (tmp == 1){
if (B[1][1]) aj = 1;
else{
if (B[1][2]) aj = 2;
else aj = i;
}
for (i=1; i<=N; i++){
if (!Detect(i, aj)){
Report(i, aj);
//cout << i << ' ' << aj << endl;
return;
}
}
}
else{
ai = 1;
for (i=1; i<=N; i++){
if (!Detect(ai, i)){
Report(ai, i);
return;
}
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |