![:)](./images/smilies/icon_smile.gif)
Search found 69 matches
- Tue Apr 09, 2013 10:47 pm
- Forum: Volume 117 (11700-11799)
- Topic: 11749 - Poor Trade Advisor
- Replies: 10
- Views: 5125
Re: 11749 : Didn't understand
Thanks remerson! Got AC using Union-Find Disjoint Sets
And the fault in the DFS solution was initializing ppamax by -2147483647.
![:)](./images/smilies/icon_smile.gif)
- Thu Mar 07, 2013 1:41 am
- Forum: Volume 115 (11500-11599)
- Topic: 11517 - Exact Change
- Replies: 33
- Views: 15789
Re: 11517 - Exact Change
Thanks a lot lbv! It was such a silly mistake in my code.
- Wed Mar 06, 2013 9:27 pm
- Forum: Volume 115 (11500-11599)
- Topic: 11517 - Exact Change
- Replies: 33
- Views: 15789
Re: 11517 - Exact Change
Some one can help me out here please? Getting WA.
Code: Select all
AC
- Thu Feb 28, 2013 11:04 pm
- Forum: Volume 117 (11700-11799)
- Topic: 11729 - Commando War
- Replies: 13
- Views: 5686
Re: 11729 - Commando War
Thanks lbv! Sorted out the problem.
- Mon Feb 18, 2013 11:59 am
- Forum: Volume 117 (11700-11799)
- Topic: 11729 - Commando War
- Replies: 13
- Views: 5686
11729 - Commando War
Anybody can give me some hints about this problem please?
- Thu Feb 14, 2013 12:14 pm
- Forum: Volume 2 (200-299)
- Topic: 208 - Firetruck
- Replies: 48
- Views: 22753
Re: 208 Why Time Limit Exceeded
Thanks
! Didn't know this info!
![:)](./images/smilies/icon_smile.gif)
- Wed Feb 13, 2013 12:02 pm
- Forum: Volume 2 (200-299)
- Topic: 208 - Firetruck
- Replies: 48
- Views: 22753
Re: 208 Why Time Limit Exceeded
Thanks Brianfry713! I thought any ordering of the routes would be fine as in the problem statement there's no mentioning of sorting the routes.
- Sat Feb 09, 2013 6:27 pm
- Forum: Volume 10 (1000-1099)
- Topic: 1098 - Robots on Ice
- Replies: 3
- Views: 2697
Re: 1098 - Robots on Ice
Or my updated code is : #include<cstdio> using namespace std; #define DIST(a, b, c, d) ((a>=c ? (a-c) : (c-a)) + (b>=d ? (b-d) : (d-b))) int n, m, gridNum, check1, check2, check3, r1, c1, r2, c2, r3, c3, soln; bool isVisited[9][9], isReachable[9][9]; void dfs(int i, int j) { isReachable[i][j] = true...
- Thu Feb 07, 2013 6:40 pm
- Forum: Volume 10 (1000-1099)
- Topic: 1098 - Robots on Ice
- Replies: 3
- Views: 2697
1098 - Robots on Ice
Someone can help me please with the pruning? Getting continuously TLE #include<cstdio> using namespace std; #define DIST(a, b, c, d) ((a>=c ? (a-c) : (c-a)) + (b>=d ? (b-d) : (d-b))) int n, m, gridNum, check1, check2, check3, r1, c1, r2, c2, r3, c3, soln; bool isVisited[9][9]; void backtrack(int i, ...
- Wed Feb 06, 2013 11:14 pm
- Forum: Volume 2 (200-299)
- Topic: 208 - Firetruck
- Replies: 48
- Views: 22753
Re: 208 Why Time Limit Exceeded
AC
Code: Select all
AC
- Wed Feb 06, 2013 10:55 pm
- Forum: Volume 112 (11200-11299)
- Topic: 11201 - The problem of the crazy linguist
- Replies: 21
- Views: 12623
Re: 11201 - The Problem of the Crazy Linguist
Thanks! Got AC!
- Wed Feb 06, 2013 7:05 pm
- Forum: Volume 111 (11100-11199)
- Topic: 11195 - Another n-Queen Problem
- Replies: 24
- Views: 18914
Re: 11195 - Another n-Queen Problem
Thanks tiendaotd for your reply! But can you please explain a bit more?
- Wed Feb 06, 2013 5:05 pm
- Forum: Volume 112 (11200-11299)
- Topic: 11201 - The problem of the crazy linguist
- Replies: 21
- Views: 12623
Re: 11201 - The Problem of the Crazy Linguist
someone can help me please? getting WA
Code: Select all
AC
- Sat Feb 02, 2013 11:17 am
- Forum: Volume 111 (11100-11199)
- Topic: 11195 - Another n-Queen Problem
- Replies: 24
- Views: 18914
Re: 11195 - Another n-Queen Problem
I used bitmasking and backtracking for the solution. And getting TLE. In my PC, the program runs for about 4s for n = 14. And for n<14, runs fast. So, a bit of pruning may get it AC. Someone can help me speeding up the program a bit? #include<cstdio> using namespace std; int n, r, ld, rd, soln; char...
- Fri Jan 25, 2013 12:01 am
- Forum: Volume 8 (800-899)
- Topic: 860 - Entropy Text Analyzer
- Replies: 13
- Views: 10797
Re: 860 - Entropy Text Analyzer
still WA. please help me find the bug in the code brianfry713. import java.io.*; import java.util.*; class Main { public static void main(String[] args) throws Exception { int count, i; double lg, E_T; String line, s, words[]; TreeMap<String, Integer> map = new TreeMap<String, Integer>(); Set<Map.En...