Submission #171544

#TimeUsernameProblemLanguageResultExecution timeMemory
171544sean617산악 구조대 (JOI13_mountain)C++98
100 / 100
22 ms956 KiB
#include "grader.h" int x; void g(int p1, int q1, int p2, int q2, int p, int q, int py, int px) { int t; while (p >= p1 && p <= p2 && q >= q1 && q <= q2) { t = Measure(p, q); if (t == x) Pinpoint(p, q); if (t < x) q += px; else p += py; } } void Rescue(int R, int C, int RS, int CS, int X) { x = X; g(1, 1, RS, CS, RS, 1, -1, 1); g(1, CS, RS, C, RS, C, -1, -1); g(RS, 1, R, CS, RS, 1, 1, 1); g(RS, CS, R, C, RS, C, 1, -1); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...