Submission #988823

#TimeUsernameProblemLanguageResultExecution timeMemory
988823benjaminkleyn산악 구조대 (JOI13_mountain)C++17
0 / 100
4 ms1112 KiB
#include "grader.h" #include<bits/stdc++.h> using namespace std; int x; vector<vector<int>> mr; int ac(int r, int c) { if (mr[r][c]>0) return mr[r][c]; int h=Measure(r, c); if (h==x) { Pinpoint(r, c); } mr[r][h]=h; return h; } void bin(int R, int lo, int hi) { while (lo<hi) { int mid=(lo+hi)/2; if (ac(R, mid)<x) lo=mid+1; else hi=mid; } } void Rescue(int R, int C, int rp, int cp, int X) { mr.assign(R+1, vector<int>(C+1, 0)); x=X; ac(rp, cp); for (int i = 1; i <= R; i++) { bin(i, 1, cp); bin(i, cp, C); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...