Search found 78 matches

by Articuno
Mon Dec 01, 2008 11:02 am
Forum: Volume 114 (11400-11499)
Topic: 11487 - Gathering Food
Replies: 11
Views: 3833

Re: 11487 - Gathering food

Hi, i am new in programming. I have learned BFS and implemented it in this problem. My program is giving correct output for the test cases those are given here. but it is WA. I think there is a problem in counting the number of shortest paths and i am confused about my technique. Can anyone please c...
by Articuno
Mon Dec 01, 2008 10:23 am
Forum: Volume 108 (10800-10899)
Topic: 10843 - Anne's game
Replies: 19
Views: 9481

Re: 10843 - Anne's game

Hi Abid,the problem in your code is you are using too straightforward approach. In this problem your program must have the ability to calculate (100^98)%2000000011. It is not possible if you just loop from 1 to 98 and store the result of multiplication in a variable. It will be a overflow.You have t...
by Articuno
Mon Dec 01, 2008 8:47 am
Forum: Volume 108 (10800-10899)
Topic: 10879 - Code Refactoring
Replies: 17
Views: 8234

Re: 10879 - Code Refactoring

Hi Abid, in your code you have implemented sieve to check whether the input is a prime or not. Your sieve is upto 1,000,000. But please check the highest value for the input. When you are checking whether 10,000,000 is a prime or not..... what you think? Is'nt there a problem? I have used your code ...

Go to advanced search