제출 #1244222

#제출 시각아이디문제언어결과실행 시간메모리
1244222amine_aroua송신탑 (IOI22_towers)C++20
4 / 100
255 ms1564 KiB
#include "towers.h" #include <bits/stdc++.h> using namespace std; vector<int> h; int n; int trg = 0; void init(int N, std::vector<int> H) { n = N; h = H; trg = 0; for(; trg+1 < n ; trg++) { if(h[trg] > h[trg + 1]) break; } } int max_towers(int L, int R, int D) { if(R <= trg || L >= trg) return 1; int ans = 1; if(h[trg] >= h[L] + D && h[trg] >= h[R] + D) ans++; return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...