Блог пользователя robertlewantest

Автор robertlewantest, история, 5 недель назад, По-английски

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
  • Проголосовать: не нравится

Автор robertlewantest, история, 3 месяца назад, По-английски

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
  • Проголосовать: не нравится

Автор robertlewantest, история, 4 месяца назад, По-английски

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
  • Проголосовать: не нравится

Автор robertlewantest, история, 4 месяца назад, По-английски

Here are my 2 submissions for the problem — https://codeforces.com/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?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится