Submission #1054010

# Submission time Handle Problem Language Result Execution time Memory
1054010 2024-08-12T04:03:33 Z t12345 산악 구조대 (JOI13_mountain) C++14
0 / 100
3 ms 568 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(rt - lt > 1) {
			int md = (lt + rt) / 2;
			if(measure(r, md, x) < x) lt = md;
			else rt = md;
		}
		lt = CS, rt = C;
		while(rt - lt > 1) {
			int md = (lt + rt) / 2;
			if(measure(r, md, x) < x) rt = md;
			else lt = md;
		}
	}
}
# Verdict Execution time Memory Grader output
1 Correct 0 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 [5]
12 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 3 ms 348 KB Output is correct
2 Correct 2 ms 568 KB Output is correct
3 Correct 2 ms 348 KB Output is correct
4 Correct 2 ms 348 KB Output is correct
5 Incorrect 3 ms 348 KB Wrong Answer [2]
6 Halted 0 ms 0 KB -