# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
72179 | 인프라웨어 상한가 가주세요. 물렸어요 (#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"
void FindTreasure(int N) {
int xIdx = -1, yIdx = -1;
int x0 = -1, y0 = -1;
int x1 = -1, y1 = -1;
int cntOne = 0;
for (int i = 1; i <= N; ++i) {
int check = Detect(1, i);
if (check == 1) {
cntOne++;
x1 = 1;
y1 = i;
}
else {
// ��ΰ� 1�ΰ�� ����
x0 = 1;
y0 = i;
}
}
if (cntOne >= 2) {
Report(x0, y0);
}
else {
yIdx = y1;
for (int i = 1; i <= N; ++i) {
int check = Detect(i, yIdx);
if (check == 0) {
Report(i, yIdx);
break;
}
}
}
return;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |