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

Автор ayushrocker92, 9 лет назад, По-английски
  • Проголосовать: нравится
  • +2
  • Проголосовать: не нравится

Автор ayushrocker92, 9 лет назад, По-английски
  • Проголосовать: нравится
  • +2
  • Проголосовать: не нравится

Автор ayushrocker92, 9 лет назад, По-английски

I was tring to solve this problem. and my solution is this. Am getting WA .I applied bipartite maximum matching on the graph .

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

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

Автор ayushrocker92, 9 лет назад, По-английски
  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

Автор ayushrocker92, 9 лет назад, По-английски

Hi,I am trying to solve this question.

Am not able to figure out the states of dp for this problem and its transition

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

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

Автор ayushrocker92, 9 лет назад, По-английски

Hi,

I am trying to solve to solve this question.

I have also read the editorial 2-3 times but i am not getting the basic concept on how to solve this question.

Please help.

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

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

Автор ayushrocker92, 9 лет назад, По-английски

Hi,when i try to submit a solution to a problem it is showing The connection was reset.

I am not able to submit my solution.Please rectify it .

Thanx

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

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

Автор ayushrocker92, 10 лет назад, По-английски

Hello,I want to know what are the good books i should buy to strengthen my concepts of OOPS. I am not a beginner and i know some of the basic concepts of OOPS and STL.I want a book that should also give me some practical knowledge that a CSE engineer should have.I really want to master OOPS please help.

Thanx :)

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

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

Автор ayushrocker92, 10 лет назад, По-английски

Given an array of n integers arr[1..n].

there are q queries

How many such subsequences exist such that multiplication of integers in that subsequence is greater than equal to L and less than equal to R??

1<=L<=R<=10^18

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

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

Автор ayushrocker92, 10 лет назад, По-английски

Hi i want to know is it possible to calculative range minimum/maximum query with BIT?

If yes then how??

And is its code shorter than segment tree for RMQ??

please help as it would be easy to write short codes during contest .Thanx :)

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

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

Автор ayushrocker92, 10 лет назад, По-английски

i have tried understanding the editorial of problem http://codeforces.com/contest/474/problem/E and understood some concepts but some of then are not clear.

Like how do you implement segment tree in this as it would require an array of size of max(h[i])

u can do it by normalization but then how could i get maximum dp value computed so far among all elements in an array having values between h[i]-d to h[i]+d in log(n)

Thanx

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

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

Автор ayushrocker92, 10 лет назад, По-английски

Hello,am trying to solve this problem on spoj. I am getting wrong answer. Am telling my approach.

It asks for the number of distinct substrings of a string. I have read suffix array and lcp from here. I count number of distinct substring as follows.

1) make suffix array and lcp array

2)count the length of suffix and subtract the lcp from this length of next lexographically sorted suffix

3)summation of all the answers obtained in step 2

More formally ans=0;

    //pos[i]=rank of a number starting at ith position
    //sa[i]=i'th rank string starting at sa[i]
    //n=length of string
    for(i=0;i<n;i++)
    {
        ans=ans+(n-sa[i])-lcp[i];
    }

link to solution I have checked for large cases and it works fine.Please point out the error .Thanx :)

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

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

Автор ayushrocker92, 10 лет назад, По-английски

hey,my round 248 div 2 problem's solution are in queue for more than an hour..m a virtual participant in it...please check it

p.s.-i hope the data doesnt get corrupted again :D

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

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