Submission #203019

#TimeUsernameProblemLanguageResultExecution timeMemory
203019arnold518산악 구조대 (JOI13_mountain)C++14
100 / 100
18 ms940 KiB
#include <bits/stdc++.h> #include "grader.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; int n, m; void Rescue(int N, int M, int cy, int cx, int val) { n=N, m=M; int i, j; int y=1, x=cx; while(y<=cy && 1<=x) { int t=Measure(y, x); if(t==val) { Pinpoint(y, x); return; } else if(t<val) y++; else if(t>val) x--; } y=1, x=cx; while(y<=cy && x<=m) { int t=Measure(y, x); if(t==val) { Pinpoint(y, x); return; } else if(t<val) y++; else if(t>val) x++; } y=n, x=cx; while(cy<=y && 1<=x) { int t=Measure(y, x); if(t==val) { Pinpoint(y, x); return; } else if(t<val) y--; else if(t>val) x--; } y=n, x=cx; while(cy<=y && x<=m) { int t=Measure(y, x); if(t==val) { Pinpoint(y, x); return; } else if(t<val) y--; else if(t>val) x++; } }

Compilation message (stderr)

mountain.cpp: In function 'void Rescue(int, int, int, int, int)':
mountain.cpp:14:9: warning: unused variable 'i' [-Wunused-variable]
     int i, j;
         ^
mountain.cpp:14:12: warning: unused variable 'j' [-Wunused-variable]
     int i, j;
            ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...