Rupai's blog

By Rupai, 12 years ago, In English

http://www.spoj.pl/problems/EPALIN/

I use KMP. First generate failure function reverse of the string that given to me, then do KMP search to find largest suffix of the string that match with the prefix of the reverse string.

But I am not able to find anything wrong in my implementation. Can anybody please tell me why it's getting TLE??? Below is my cpp source code:

Edit: Got AC

Full text and comments »

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

By Rupai, 13 years ago, In English
My problem statement:

You are given N (N<=1000) points in X,Y co-ordinates. X and Y are both positive. Now, the problem is using maximum number of point you have to draw a straight line and also using maximum number of point you have to draw a 1/4 shape parabola. Actually, here you have to solve two problem at the same time. You can use any point to draw any one from those. You can use those point that are use to draw a straight line for 1/4 shape parabola.

Now all I need is your help to solve this problem. Please discuss your opinion.

Full text and comments »

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

By Rupai, 14 years ago, In English
I really want to learn pointer, so I need some tutorial that have good resource on pointer. Can anybody give me some links or books???

Thanks in advance:)

Full text and comments »

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