Submission #633344

#TimeUsernameProblemLanguageResultExecution timeMemory
633344minhcool산악 구조대 (JOI13_mountain)C++17
100 / 100
8 ms980 KiB
#include "grader.h" #include<bits/stdc++.h> using namespace std; //#define int long long #define fi first #define se second #define pb push_back #define mp make_pair typedef pair<int, int> ii; typedef pair<ii, int> iii; typedef pair<ii, ii> iiii; const int oo = 1e18 + 7, mod = 1e9 + 7; const int N = 1e5 + 5; void Rescue(int R, int C, int Rm, int Cm, int X){ int cur_itr = R; for(int i = Cm; i >= 1; i--){ int temp = Measure(cur_itr, i); while(cur_itr >= Rm && temp < X){ cur_itr--; if(cur_itr < Rm) break; temp = Measure(cur_itr, i); } if(cur_itr < Rm) break; if(temp == X){ Pinpoint(cur_itr, i); } } cur_itr = 1; for(int i = Cm; i >= 1; i--){ int temp = Measure(cur_itr, i); while(cur_itr <= Rm && temp < X){ cur_itr++; if(cur_itr > Rm) break; temp = Measure(cur_itr, i); } if(cur_itr > Rm) break; if(temp == X){ Pinpoint(cur_itr, i); } } cur_itr = R; for(int i = Cm; i <= C; i++){ int temp = Measure(cur_itr, i); while(cur_itr >= Rm && temp < X){ cur_itr--; if(cur_itr < Rm) break; temp = Measure(cur_itr, i); } if(cur_itr < Rm) break; if(temp == X){ Pinpoint(cur_itr, i); } } cur_itr = 1; for(int i = Cm; i <= C; i++){ int temp = Measure(cur_itr, i); while(cur_itr <= Rm && temp < X){ cur_itr++; if(cur_itr > Rm) break; temp = Measure(cur_itr, i); } if(cur_itr > Rm) break; if(temp == X){ Pinpoint(cur_itr, i); } } }

Compilation message (stderr)

mountain.cpp:15:21: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
   15 | const int oo = 1e18 + 7, mod = 1e9 + 7;
      |                ~~~~~^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...