Submission #955581

#TimeUsernameProblemLanguageResultExecution timeMemory
955581gmroh06산악 구조대 (JOI13_mountain)C++14
100 / 100
5 ms1112 KiB
#include "grader.h" using namespace std; void f(int rs, int re, int cs, int ce, int r, int c, int dr, int dc, int X) { int ht; while(rs<=r && r<=re && cs<=c && c<=ce) { ht = Measure(r, c); if(ht == X) {Pinpoint(r, c); return;} ht<X ? c += dc : r += dr; } } void Rescue(int R, int C, int RS, int CS, int X) { f(1, RS, 1, CS, RS, 1, -1, 1, X); f(RS, R, 1, CS, RS, 1, 1, 1, X); f(1, RS, CS, C, RS, C, -1, -1, X); f(RS, R, CS, C, RS, C, 1, -1, X); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...