Search found 78 matches
- Tue Dec 29, 2009 10:31 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10890 - Maze
- Replies: 13
- Views: 9364
Re: 10890 - Maze
Can anyone explain why this idea is not working? My idea was very simple. I used bfs. 1. I use a three dimensional array such as cost[number of treasures collected yet][row][column]; 2. Visit every position and if there is a treasure in that position yet to be collected... collect it and if possible...
- Fri Dec 25, 2009 8:13 am
- Forum: Volume 8 (800-899)
- Topic: 840 - Deadlock Detection
- Replies: 5
- Views: 3751
Re: 840 - Deadlock Detection
I did a silly mistake in my code and for that reason my code failed in such a simple test case:
My code returns "NO".
But I got AC. Don't know why?
Code: Select all
1
2 2 4
Y-a a-X X-b b-Y
But I got AC. Don't know why?

- Fri Dec 25, 2009 8:04 am
- Forum: Volume 8 (800-899)
- Topic: 840 - Deadlock Detection
- Replies: 5
- Views: 3751
Re: 840 - Deadlock Detection
I don't understand how this thing could be a deadlock X-b-X My AC code does not considered this as a deadlock but in the previous posts it is considered as a deadlock........ Here b is assigned to X and X needs b. How could it be a deadlock? :o I think the input set is not good enough for this probl...
- Thu Dec 24, 2009 8:21 am
- Forum: Volume 1 (100-199)
- Topic: 193 - Graph Coloring
- Replies: 93
- Views: 23851
Re: How can i solve the problem 193
I am very poor in backtracking...... trying to learn...... I am getting WA again and again...... My code works for the sample inputs given here........ Can someone provide me some more test cases please? It will be very helpful. Here is my code: #include<iostream> #include<cmath> #include<cstring> #...
- Wed Dec 16, 2009 8:36 am
- Forum: Volume 105 (10500-10599)
- Topic: 10595 - Knight on the Bee Board
- Replies: 17
- Views: 11924
Re: 10595 - Knight on the Bee Board
Can anyone tell me how to model this kind of graph into a two dimensiomal graph...... I dont get it............
- Mon Dec 14, 2009 11:06 pm
- Forum: Volume 104 (10400-10499)
- Topic: 10472 - Fastest Vs Cheapest
- Replies: 17
- Views: 8206
Re: 10472 - Fastest vs Cheapest
Can anyone give me some test cases please? I am getting WA........ Someone help 

- Sat Dec 12, 2009 8:05 am
- Forum: Volume 104 (10400-10499)
- Topic: 10426 - Knights' Nightmare
- Replies: 17
- Views: 8216
Re: 10426 - Knights' Nightmare
Can anyone give me some critical test cases? I am getting WA.... Here is my code:
Code: Select all
AC
- Fri Dec 11, 2009 7:17 pm
- Forum: Volume 103 (10300-10399)
- Topic: istringstream
- Replies: 11
- Views: 11246
Re: 10389 - Subway
Can anyone say what does this line in the problen description means.. I don't get it
Help will be appreciated. ThanksYou may assume the subway runs in a straight line between adjacent stops, and the coordinates represent an integral number of metres.
- Wed Dec 09, 2009 12:58 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10039 - Railroads
- Replies: 20
- Views: 8985
Re: 10039 - Railroads
I am not sure how to solve this problem. Can anyone tell me about a general approach? Is it possible to solve this problem with bfs or dijkstra? Someone reply please... thanks in advance
- Mon Dec 07, 2009 10:25 am
- Forum: Volume 115 (11500-11599)
- Topic: 11537 - Secret Problemsetters' Union
- Replies: 4
- Views: 3144
Re: 11537 - Secret Problemsetters' Union
Can anyone give me some ideas about how to solve this problem......... Someone please reply
- Fri Oct 30, 2009 6:49 am
- Forum: Volume 105 (10500-10599)
- Topic: 10592 - Freedom Fighter
- Replies: 17
- Views: 10062
Re: 10592 - Freedom Fighter
I don't understand one thing. In the problem description it is said that It is granted that a freedom fighter group can fight only one opponent group at a time. So why there are inputs like these in the previous posts?? Can anyone tell me? 10 ......**** .***.*BBBB PPPP*.BPPP BBBB*..BBB PPPP*.***B **...
- Fri Sep 04, 2009 12:17 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10158 - War
- Replies: 23
- Views: 9941
Re: 10158 - War
Can anyone give me some more critical test cases? I am getting WA and I can't find my error. Someone please help.....
Here is my code:
AC
Here is a test case:
The output should be:
-1
Hope it helps
Here is my code:
AC
Here is a test case:
Code: Select all
5
1 0 1
1 2 3
2 1 3
1 0 2
0 0 0
-1
Hope it helps
- Sun Aug 23, 2009 11:55 am
- Forum: Volume 3 (300-399)
- Topic: 321 - The New Villa
- Replies: 17
- Views: 10341
Re: Problem 321
My code is getting TLE. Is there anyone who can check my code please????
Code: Select all
AC
- Tue Jun 09, 2009 11:38 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10360 - Rat Attack
- Replies: 19
- Views: 45440
Re: 10360 - Rat Attack
Here is my code. Can anyone tell me what is wrong here? I am getting WA..please help.
Please someone reply........
Code: Select all
removed
- Mon May 25, 2009 7:23 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10360 - Rat Attack
- Replies: 19
- Views: 45440
Re: 10360 - Rat Attack
Can anyone help me with some critical input? I am continuously getting WA. Please help.....