Submission #1054006

# Submission time Handle Problem Language Result Execution time Memory
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;
		}
	}
}
# Verdict Execution time Memory 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 -
# Verdict Execution time Memory 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 -