이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "grader.h"
using namespace std;
void f(int rs, int re, int cs, int ce, int r, int c, int dr, int dc, int X) {
int ht;
while(rs<=r && r<=re && cs<=c && c<=ce) {
ht = Measure(r, c);
if(ht == X) {Pinpoint(r, c); return;}
ht<X ? c += dc : r += dr;
}
}
void Rescue(int R, int C, int RS, int CS, int X) {
//
f(1, RS, 1, CS, RS, 1, -1, 1, X);
//
f(RS, R, 1, CS, RS, 1, 1, 1, X);
//
f(1, RS, CS, C, RS, C, -1, -1, X);
//
f(RS, R, CS, C, RS, C, 1, -1, X);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |