답안 #527880

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
527880 2022-02-18T15:37:30 Z rainboy 산악 구조대 (JOI13_mountain) C
0 / 100
12 ms 840 KB
#include "grader.h"

int h;

int Measure_(int n, int m, int i, int j) {
	int h_, tmp;

	for (h_ = h; h_ < 4; h_++) {
		tmp = n - 1 - i, i = j, j = tmp;
		tmp = n, n = m, m = tmp;
	}
	return Measure(i + 1, j + 1);
}

void Pinpoint_(int n, int m, int i, int j) {
	int h_, tmp;

	for (h_ = h; h_ < 4; h_++) {
		tmp = n - 1 - i, i = j, j = tmp;
		tmp = n, n = m, m = tmp;
	}
	Pinpoint(i + 1, j + 1);
}

void Rescue(int n, int m, int i_, int j_, int x_) {
	int i, j, tmp;

	for (h = 0; h < 4; h++) {
		i = i_, j = 0;
		while (i >= 0 && j <= j_) {
			int x = Measure_(n, m, i, j);

			if (x > x_)
				i--;
			else if (x < x_)
				j++;
			else {
				Pinpoint_(n, m, i, j);
				return;
			}
		}
		tmp = n - 1 - i_, i_ = j_, j_ = tmp;
		tmp = n, n = m, m = tmp;
	}
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 208 KB Wrong Answer [1]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 776 KB Output is correct
2 Correct 6 ms 684 KB Output is correct
3 Correct 5 ms 720 KB Output is correct
4 Correct 6 ms 808 KB Output is correct
5 Correct 5 ms 792 KB Output is correct
6 Correct 5 ms 760 KB Output is correct
7 Correct 5 ms 796 KB Output is correct
8 Correct 5 ms 736 KB Output is correct
9 Correct 5 ms 808 KB Output is correct
10 Correct 5 ms 800 KB Output is correct
11 Correct 7 ms 840 KB Output is correct
12 Correct 7 ms 800 KB Output is correct
13 Correct 5 ms 756 KB Output is correct
14 Correct 5 ms 732 KB Output is correct
15 Correct 5 ms 720 KB Output is correct
16 Correct 5 ms 824 KB Output is correct
17 Correct 4 ms 720 KB Output is correct
18 Correct 5 ms 812 KB Output is correct
19 Correct 5 ms 820 KB Output is correct
20 Correct 5 ms 780 KB Output is correct
21 Correct 6 ms 812 KB Output is correct
22 Correct 4 ms 720 KB Output is correct
23 Correct 5 ms 720 KB Output is correct
24 Correct 5 ms 780 KB Output is correct
25 Correct 7 ms 792 KB Output is correct
26 Correct 12 ms 752 KB Output is correct
27 Correct 5 ms 796 KB Output is correct
28 Correct 5 ms 800 KB Output is correct
29 Correct 5 ms 684 KB Output is correct
30 Correct 5 ms 720 KB Output is correct
31 Incorrect 5 ms 704 KB Wrong Answer [5]
32 Halted 0 ms 0 KB -