| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 623766 | iomoon191 | 산악 구조대 (JOI13_mountain) | C++17 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <grader.h>
#include <bits/stdc++.h>
using namespace sstd;
int x_;
void sub(int x1, int x2, int y1, int y2, int cx, int cy, int dx, int dy){
while(x1 <= cx and cx <= x2 and y1 <= cy and cy <= y2){
int h = Measure(cx, cy);
if(h == x_){
Pinpoint(cx, cy);
}
else if(h < x_) cx += dx;
else cy += dy;
}
}
void Rescue(int r, int c, int rs, int cs, int x){
_x = x;
sub(1, rs, 1, cs, 1, cs, 1, -1);
sub(rs, r, 1, cs, r, cs, -1, -1);
sub(1, rs, cs, c, 1, cs, 1, 1);
sub(rs, r, cs, c, r, cs, -1, 1);
}
