Submission #1071730

#TimeUsernameProblemLanguageResultExecution timeMemory
1071730beaconmcRadio Towers (IOI22_towers)C++17
0 / 100
507 ms1364 KiB
#include "towers.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; #define FOR(i,x,y) for(ll i=x; i<y; i++) #define FORNEG(i,x,y) for(ll i=x; i>y; i--) int maxi = 0; vector<int> towers; void init(int N, std::vector<int> H) { towers = H; FOR(i,0,N){ maxi = max(maxi, H[i]); } } int max_towers(int L, int R, int D) { if (L==R) return 1; if (maxi - towers[L] >= D && maxi - towers[R] >= D){ return 2; }else{ return 1; } }
#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...