RT。 学校模拟赛签到题手写了个二分,大概是:
inline int find(vector<int> x,int y) { ...... }
1≤n,m≤1051\le n,m\le10^51≤n,m≤105,复杂度 O(nlogm)O(n\log m)O(nlogm),只因传了个vector,TLE100pts->15pts,改成不传参:
for(int i=1;i<=n;i++) { int l=0,r=m; while(r-l>1) { vec[h][mid]... } }
直接就A了。想知道为什么。