User profile: damphy

User info
User name:damphy
History
Joined:
Number of posts:9
Latest posts:

chonq
Yeah I have also tried binsearch but the non-monotonicity of the function didn't help. The exercise ...

chonq
long long n,k; cin>>n>>k; vector<long long>arr(n); for(int i=0;i<n;i++) cin>>arr[i]; for(int i=0;i<n...

chonq
of course for simple test cases just brute force,but i am getting TLE for other cases. Any hints?

chonq
how to solve it optimally? n<=100000

chonq
Chef went to the store and saw a long queue. There are N people in the queue (numbered 1 through N f...