| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 1164866 | nuutsnoynton | 산악 구조대 (JOI13_mountain) | C++20 | 0 ms | 0 KiB | 
#include <bits/stdc++.h>
//#include "grader.h"
using namespace std;
using ll = long long;
const int mod = 998244353;
void Rescue(int R, int C, int MR, int MC, int X){
	int x, y, s;
	x = MR;
	y = 1;
	while ( y < MC ) {
		while (x >= 1) {
			s =  Measure(x, y);
			if ( s > X) x --;
			else {
				if (s == X) {
					Pinpoint(x, y);
				}
				else break;
			}
		}
		y ++;
	}
	x = MR;
	y = C;
	while ( y >= MC ) {
		while (x >= 1) {
			s =  Measure(x, y);
			if ( s > X) x --;
			else {
				if (s == X) {
					Pinpoint(x, y);
				}
				else break;
			}
		}
		y --;
	}
	x = MR;
	y = 1;
	while ( y < MC ) {
		while (x <= R) {
			s =  Measure(x, y);
			if ( s > X) x ++;
			else {
				if (s == X) {
					Pinpoint(x, y);
				}
				else break;
			}
		}
		y ++;
	}
	x = MR;
	y = C;
	while ( y >= MC ) {
		while (x <= R) {
			s =  Measure(x, y);
			if ( s > X) x ++;
			else {
				if (s == X) {
					Pinpoint(x, y);
				}
				else break;
			}
		}
		y --;
	}
}
