# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
72354 | 우리는 진실을 잊고 살잖아~~~ (#118) | 마법 다우징 (FXCUP3_magic) | C++17 | 2 ms | 256 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "dowsing.h"
//#include <iostream>
//using namespace std;
bool B[101][101];
void FindTreasure(int N) {
int x, y, cnt=0;
for (int i=1; i<=N; i++){
if (Detect(i, i)){
++cnt;
if (cnt == 2){
y=i;
break;
}
x=i;
continue;
}
}
if (cnt > 0){
int c;
if (y != x+1) c = x+1;
else{
if (y != N) c = N;
else c = N-1;
}
if (Detect(x, c)){
Report(x, y);
return;
}
Report(y, x);
return;
}
cnt=0;
for (int i=1; i<=49; i++){
if (Detect(i, 100-i+1)){
++cnt;
x = i;
y = 100-i+1;
break;
}
}
if (cnt == 0) x = 50, y = 51;
int c;
if (y != x+1) c = x+1;
else{
if (y != N) c = N;
else c = N-1;
}
if (Detect(x, c)) Report(x, x);
else Report(y, y);
return;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |