답안 #1054006

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1054006 2024-08-12T03:57:29 Z t12345 산악 구조대 (JOI13_mountain) C++14
0 / 100
5 ms 948 KB
#include "grader.h"

int measure(int r, int c, int x) {
	int ret = Measure(r, c);
	if(ret == x) Pinpoint(r, c);
	return ret;
}

void Rescue(int R, int C, int RS, int CS, int x) {
	for(int r=1; r<=R; r++) {
		int h = measure(r, CS, x);
		if(h < x) continue;
		int lt = 0, rt = CS;
		while(lt <= rt) {
			int md = (lt + rt) / 2;
			if(measure(r, md, x) < x) lt = md + 1;
			else rt = md - 1;
		}
		lt = CS, rt = C;
		while(lt <= rt) {
			int md = (lt + rt) / 2;
			if(measure(r, md, x) < x) rt = md - 1;
			else lt = md + 1;
		}
	}
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Incorrect 0 ms 348 KB Wrong Answer [1]
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 860 KB Output is correct
2 Correct 3 ms 860 KB Output is correct
3 Correct 3 ms 860 KB Output is correct
4 Correct 3 ms 860 KB Output is correct
5 Incorrect 5 ms 948 KB Wrong Answer [1]
6 Halted 0 ms 0 KB -