Submission #372648

#TimeUsernameProblemLanguageResultExecution timeMemory
372648phathnv산악 구조대 (JOI13_mountain)C++11
100 / 100
10 ms1004 KiB
#include <bits/stdc++.h> #include "grader.h" using namespace std; void SubRescue(int r, int c, int x, int y, int expecH, int dx1, int dy1, int dx2, int dy2){ while (1 <= x && x <= r && 1 <= y && y <= c){ int h = Measure(x, y); if (h == expecH) Pinpoint(x, y); else if (h > expecH) x += dx1, y += dy1; else x += dx2, y += dy2; } } void Rescue(int r, int c, int rs, int cs, int expecH){ SubRescue(r, c, 1, cs, expecH, 0, -1, 1, 0); SubRescue(r, c, rs, c, expecH, -1, 0, 0, -1); SubRescue(r, c, r, cs, expecH, 0, 1, -1, 0); SubRescue(r, c, rs, 1, expecH, 1, 0, 0, 1); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...