Are you a coding enthusiast who participates in major coding contests and online assessments? Look no further! Introducing 'online assessment| ALL at one Point |' Telegram channel, also known as '@oahelp'. This channel is your one-stop destination for free copy-paste solutions to all major coding contests and online assessments.
At 'online assessment| ALL at one Point |', we provide you with all the codes you need for free, along with regular updates on internships and job opportunities. No more struggling to find the right solutions - everything you need is right here in one convenient place.
Join our channel today for access to a plethora of resources, from codes to regular job updates. Stay ahead of the curve and enhance your coding skills with the help of our community.
Don't miss out on the opportunity to be part of a group of like-minded individuals who are passionate about coding. Join our discussion group at https://t.me/oadiscussion and start engaging with fellow members today. Take your coding journey to the next level with 'online assessment| ALL at one Point |'.
18 Sep, 05:01
18 Sep, 04:57
17 Sep, 18:26
17 Sep, 16:00
17 Sep, 13:53
long getMaxDist(std::vector<long> starts, long d) {
int n = starts.size();
sort(starts.begin(), starts.end()); // Sort the starting points in ascending order
long l = 0, r = 1e14;
while (l < r) {
long mid = (l + r + 1) / 2;
int ans = 1;
long pr = 0;
for (int i = 0; i < n; i++) {
if (pr > starts[i] + d) {
ans = 0;
} else {
pr = std::max(pr + mid, starts[i]);
}
}
if (ans) {
l = mid;
} else {
r = mid - 1;
}
}
return l;
}
17 Sep, 13:33
int l=0,r=1e14;
while(l<r){
int mid=(l+r+1)>>1;
int ans=1;
int pr=0;
for(int i=0;i<n;i++){
if(pr>starts[i]+d){
ans=0;
}else{
pr=max(pr+mid,starts[i]);
}
}
if(ans){
l=mid;
}else{
r=mid-1;
}
}
return l;
17 Sep, 13:05
ll solve(vector<int> &arr){
int n=arr.size();
vector<ll> pf(n),sf(n);
pf[0]=arr[0];
sf[n-1]=arr[n-1];
for(int i=1;i<n;i++) pf[i]=arr[i]+pf[i-1];
for(int i=n-2;i>=0;i--) sf[i]=arr[i]+sf[i+1];
ll sm=0,mn=0;
ll mx=-1e18;
for(int i=0;i<n;i++){
sm+=arr[i];
if(sm>0) sm=0;
mn=min(mn,sm);
mx=max(mx,pf[i]-2*mn-(i<n-1?sf[i+1]:0));
}
return mx;
}
17 Sep, 05:56