robertlewantest's blog

By robertlewantest, history, 7 months ago, In English

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.

Full text and comments »

  • Vote: I like it
  • +21
  • Vote: I do not like it

By robertlewantest, history, 8 months ago, In English

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..

Full text and comments »

  • Vote: I like it
  • -13
  • Vote: I do not like it

By robertlewantest, history, 9 months ago, In English

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

Full text and comments »

  • Vote: I like it
  • -5
  • Vote: I do not like it

By robertlewantest, history, 9 months ago, In English

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

243140165 -1 243140452 -2

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?

Full text and comments »

  • Vote: I like it
  • +3
  • Vote: I do not like it