Search found 6 matches

by shalinmangar
Sun Mar 19, 2006 12:12 pm
Forum: Volume 110 (11000-11099)
Topic: 11012 - Cosmic Cabbages
Replies: 29
Views: 11698

This problem is not so difficult.
Once you got a simple idea, you can make out a linear algorithm.

Another Hint)
The manhattan distance
between (0, 0) and (2, 3)
between (0, 0) and (3, 2)
between (0, 0) and (5, 0)
...
is same. It is clear how to calculate the distance between two cabbages. Can you ...
by shalinmangar
Wed Mar 15, 2006 12:25 pm
Forum: Volume 110 (11000-11099)
Topic: 11000 - Bee
Replies: 25
Views: 16999

Yes, I got AC. I saw the problem after seeing this post so my thoughts were pretty biased. It was trivial.
by shalinmangar
Tue Mar 14, 2006 9:45 pm
Forum: Volume 110 (11000-11099)
Topic: 11000 - Bee
Replies: 25
Views: 16999

Is it really?
by shalinmangar
Sun Mar 05, 2006 8:14 am
Forum: Volume 110 (11000-11099)
Topic: 11004 - Changing Roadmap
Replies: 9
Views: 4079

Thanks that got me AC
by shalinmangar
Sat Mar 04, 2006 10:23 pm
Forum: Volume 110 (11000-11099)
Topic: 11004 - Changing Roadmap
Replies: 9
Views: 4079

Yes, I used the same method.

But ofcourse the max values of N = 3000 and PP = 100, hence this method gives a complexity of O(n*n*PP) which is too slow to execute within the 3 second time limit.
by shalinmangar
Sun Jan 29, 2006 10:30 am
Forum: Volume 4 (400-499)
Topic: 497 - Strategic Defense Initiative
Replies: 144
Views: 44399

Your code is wrong. Consider the following testcase:

100
45
46
47
48
49
11
1

Your code gives the answer as:
Max hits: 1
1

But actually we can have:
Max hits: 5
45
46
47
48
49

Go to advanced search