Submission #12930

#TimeUsernameProblemLanguageResultExecution timeMemory
12930gs13068산악 구조대 (JOI13_mountain)C++98
100 / 100
21 ms640 KiB
#include "grader.h" #include <algorithm> void Rescue(int n,int m,int x,int y,int z) { int i,j,t; i=1; j=y; while(i<=x&&j>=1) { t=Measure(i,j); if(t==z) { Pinpoint(i,j); return; } if(t<z)i++; else j--; } i=1; j=y; while(i<=x&&j<=m) { t=Measure(i,j); if(t==z) { Pinpoint(i,j); return; } if(t<z)i++; else j++; } i=n; j=y; while(i>=x&&j>=1) { t=Measure(i,j); if(t==z) { Pinpoint(i,j); return; } if(t<z)i--; else j--; } i=n; j=y; while(i>=x&&j<=m) { t=Measure(i,j); if(t==z) { Pinpoint(i,j); return; } if(t<z)i--; else j++; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...