deepak_097's blog

By deepak_097, history, 5 years ago, In English

Suppose we have an array which consist of n elements: a1, a2, a3, ..... , an and we have given the value of k which is the count of removed elements from the array. So after removing k elements from the array what is the maximum value of absolute difference of the adjacent elements of the array. Suppose,

n=5 k=3

1 2 5 2 1

then we remove 1,2,2 then the remaining elements of the array will be 5 1 so, ans=abs(5-1)=4 (maximum value which we can get).

Full text and comments »

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

By deepak_097, history, 5 years ago, In English

Problem- link

Please anybody explain the soln.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By deepak_097, history, 5 years ago, In English

Can anybody please tell me why i am getting -1 in test case No.9 :(

Problem Link- link

Problem Name- Hard problem

My solution — link

Thanks in advance :)

Full text and comments »

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

By deepak_097, history, 5 years ago, In English

Please help me to solve this problem — link

Please mention this kind of problems in comment section.

Contest link — link

Thank you :)

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By deepak_097, history, 6 years ago, In English

Please suggest me some problems that are related to bitwise operations (and, or, xor) and segment tree mainly "and" operation related problems.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By deepak_097, history, 6 years ago, In English

Please help me to optimise my code i am getting TLE since 6 hours.

problem link- link solution link- link

I tried every possible way to get rid over TLE but nothing works.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By deepak_097, history, 6 years ago, In English

Please help me to solve this problem.

Problem link- link

Or help me to understand this solution.

Full text and comments »

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

By deepak_097, history, 6 years ago, In English

Problem Link- link

I am getting WA on this question can't figure it out where I am going wrong. I tested many cases in which my code is passing correctly :(. Please help me to get rid of this problem.

My solution- link

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By deepak_097, history, 6 years ago, In English

What is the logic behind this to solve this problem ?

problem link (https://www.spoj.com/problems/PPATH/)

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it