### robertlewantest's blog

By robertlewantest, history, 5 weeks ago,

Given an array of N positive integers. You can make any number of elements in it negative such that every prefix sum of the array remains positive i.e >0. Find the maximum number of elements you can make negative.

Example 5 2 3 5 2 3

Answer= 3. This can be converted to 5 -2 3 5 -2 -3

N is 10^5 Ai<=10^9.

• +21

By robertlewantest, history, 3 months ago,

After last round rating change i missed specialist by 11 points (although predictor showed +43 that makes it more sad). Now im feeling very bad and lost all motivation..

• -13

By robertlewantest, history, 4 months ago,

Hi all, I have given more than 9 contests still im pupil.. can someone pls help me how should i practice to become specialist as soon as possible

• -5

By robertlewantest, history, 4 months ago,

Here are my 2 submissions for the problem — https://mirror.codeforces.com/contest/1541/problem/B

Only difference between the two is the if condition — in first if(l<r and var==(l+r) and in second if(l<r and var%(l+r)==0 and (var/(l+r))==1)

Ideally both should produce same result but on test 103 it is failing - The test 103 is this

n=4 a=5 2 4 1

its answer should be 1 and indeed its 1 when i run in local or custom invoction but on submit it is giving answer 2 hence WA

Can someone pls help why is behaviour?

• +3