Problem lampposts
User LeBronJames
Submission Time 2026-10-31 10:16:59
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lampposts.cpp: In function ‘void find_lampposts(int, int, int*)’:
lampposts.cpp:5:2: error: ‘fill’ was not declared in this scope
5 | fill(ans,ans+L+1,-1);
| ^~~~
lampposts.cpp:26:13: error: ‘nearest_lamppost’ was not declared in this scope
26 | t = nearest_lamppost(mid);
| ^~~~~~~~~~~~~~~~
lampposts.cpp:32:21: error: ‘min’ was not declared in this scope; did you mean ‘mid’?
32 | maxx[i]=min(maxx[i],mid);
| ^~~
| mid
lampposts.cpp:39:21: error: ‘max’ was not declared in this scope; did you mean ‘maxx’?
39 | minn[i]=max(minn[i],mid);
| ^~~
| maxx