| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 72356 | https://blog.naver.com/nywoo19 (#118) | 마법 다우징 (FXCUP3_magic) | C++17 | 3 ms | 420 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "dowsing.h"
#include <bits/stdc++.h>
using namespace std;
void FindTreasure(int N) {
int R, C;
vector<int> vt;
for(int j = 1; j <= N; j++){
if(Detect(j, j)){
vt.push_back(j);
}
}
if(vt.size() == 0){
for(int j = 1; j < (N + 1) / 2; j++){
if(Detect(j, N - j + 1)){
if(j == 1){
if(!Detect(2, j))Report(N - j + 1, N - j + 1);
else Report(j , j);
}
else{
if(!Detect(1, j)) Report(N - j + 1, N - j + 1);
else Report(j , j);
}
return;
}
}
if(N % 2 == 0){
if(Detect(1, N / 2)) Report(N / 2, N / 2);
else Report(N / 2 + 1, N / 2 + 1);
}
else{
Report((N + 1) / 2, (N + 1) / 2);
}
}
else{
int R = vt[0], C = vt[1];
bool f = false;
for(int i = 1; i <= 5; i++){
if(i == C) continue;
if(!Detect(R, i)){
f = true;
break;
}
}
if(f) swap(R, C);
Report(R, C);
}
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
