Search found 13 matches

by deepesh
Mon Mar 05, 2007 6:29 pm
Forum: Volume 111 (11100-11199)
Topic: 11191 - Square
Replies: 23
Views: 13506

Please help with some test cases.

I am using a order 2^22 algorithm. But I am getting a run time error signal 11. Can some one tell me as to how I go about fixing the bug. I am getting valid answers on Sohel's test case and all the sample test cases. Please help, with a few critical test cases. Thank you Edit: Got accepted. Removed ...
by deepesh
Sun Mar 04, 2007 6:21 pm
Forum: Volume 111 (11100-11199)
Topic: 11186 - Circum Triangle
Replies: 18
Views: 7360

if (n<3) you should not just return, but read the corresponding values as well.

2 10
1.00
359.00

You should not miss reading 1.00 and 359.00 even if you do not process them.
by deepesh
Sun Mar 04, 2007 6:09 pm
Forum: Volume 111 (11100-11199)
Topic: 11186 - Circum Triangle
Replies: 18
Views: 7360

I have got accepted on this problem with an order n^2 algorithm. But I am not able to think of an order n algorithm. It would be great if some one could give a hint.
by deepesh
Sun Mar 04, 2007 1:11 pm
Forum: Volume 111 (11100-11199)
Topic: 11186 - Circum Triangle
Replies: 18
Views: 7360

11186 - Circum Triangle

I thought a nc3*(16) test cases would not result in TLE. But I could never get it working in the contest. Is there any trick that I can use to do this problem. Is the expected order n^3 or is there a better solution? I pre-calculate all the sin(angle). where angle ranges from 0 to 360. Still I am no...
by deepesh
Wed Feb 28, 2007 7:50 am
Forum: Volume 111 (11100-11199)
Topic: 11176 - Winning Streak
Replies: 18
Views: 12876

I have got accepted on this problem by considering three separate cases:

F[j] -> case 1, i<=j ; case 2;i==j+1; case 3 i>j+1.

Is there any elegant method which does all this in a single formula?
by deepesh
Tue Feb 27, 2007 12:44 pm
Forum: Volume 111 (11100-11199)
Topic: 11182 - Zeroes III
Replies: 12
Views: 4805

Can you give the answer for :
1000000 2

Also can you give a few more test cases. I am getting a wrong answer.


[Edit] -> I have got accepted on this problem
by deepesh
Mon Jan 22, 2007 11:40 am
Forum: Volume 111 (11100-11199)
Topic: 11158 - Elegant Permuted Sum
Replies: 23
Views: 15172

how do you prove that the greedy approach gives you an optimal solution?
by deepesh
Sun Jan 21, 2007 9:07 pm
Forum: Volume 111 (11100-11199)
Topic: 11157 - Dynamic Frog
Replies: 22
Views: 14245

I just coded what I felt and my code has got accepted on the first submission. Will just code from next time based on the idea.
by deepesh
Sun Jan 21, 2007 10:06 am
Forum: Volume 111 (11100-11199)
Topic: 11157 - Dynamic Frog
Replies: 22
Views: 14245

I understand that small rocks are the once to be considered, between 2 big rocks, and from the starting point to first big rock and ending point to last rock. So there should be two distinct set of small stones through which we should be able to reach from any big rock/destination. (going from start...
by deepesh
Sun Jan 21, 2007 8:43 am
Forum: Volume 111 (11100-11199)
Topic: 11157 - Dynamic Frog
Replies: 22
Views: 14245

11157 - Dynamic Frog

Can some one give me a hint as to how I should solve the problem. In a DP approach, I see that if we try to denote the state space as every visited "Small Rock" and in the worst case there are 100 small rocks, the algorithm will never run in time. Is there some greedy algorithm that is possible to s...
by deepesh
Thu Jan 18, 2007 6:36 am
Forum: General
Topic: Author Ranking system
Replies: 2
Views: 3279

Author Ranking system

Ranking system in SPOJ(http://www.spoj.pl) is based on the formula:
80/(40+number of people who have solved the problem). It would be good to have a similar rating here as well?
by deepesh
Mon Jan 01, 2007 8:08 pm
Forum: Volume 111 (11100-11199)
Topic: 11151 - Longest Palindrome
Replies: 65
Views: 33375

Wrong answer.

My code has got accepted. Can you explain as to why the scanf ate away the charater?
by deepesh
Mon Jan 01, 2007 7:50 pm
Forum: Volume 111 (11100-11199)
Topic: 11151 - Longest Palindrome
Replies: 65
Views: 33375

Wrong answer.

Following is my code during the contest. I have tested many of the edge cases including empty string. And this works. Can you give me a few more edge cases?

I keep getting wrong answer.

Code accepted now. Removed this.

Go to advanced search