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 "grader.h"
using namespace std;
void Rescue(int R, int C, int RS, int CS, int X) {
for(int r = 1; r <= R; r++) {
int left = 1;
int right = C;
while(left <= right) {
int mid = (left + right) / 2;
int ht = Measure(r, mid);
if(ht == X) {
Pinpoint(r, mid);
return;
} else if(ht < X) {
left = mid + 1; // 고도가 X보다 낮으면 오른쪽으로 이동
} else {
right = mid - 1; // 고도가 X보다 높으면 왼쪽으로 이동
}
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |