## Search found 10 matches

Thu Jan 14, 2016 6:52 pm
Forum: Volume 9 (900-999)
Topic: 907 - Winterim Backpacking Trip
Replies: 8
Views: 10094

### Re: 907 - Winterim Backpacking Trip

well I've solved this using dp ... simple recursive formula ...
btw thanks to mf for suggesting BS solution
Well probably there's a DP solution, but it's easier and faster to solve it with binary search.
Read misof's excellent analysis of a similar problem ("Turnpike" in that link)
Mon Jan 11, 2016 7:18 am
Forum: Volume 9 (900-999)
Topic: 988 - Many Paths, One Destination
Replies: 9
Views: 7365

### Re: 988 - Many Paths, One Destination

I think Input provided by SADIQ(AIUB) in udebug is not in correct form . Please remove that kind of incorrect input.

Code: Select all

``````3
2 1 2
0
0
4
2 1 2
0
0
3 2
3
5
2 1 2
1 3
1 4
0
0
0
5
2 1 2
1 3
1 4
3 4
0``````
take a look carefully .. The last 3 inputs are incorrect .
Mon Jan 04, 2016 5:49 pm
Forum: Volume 4 (400-499)
Topic: 452 - Project Scheduling
Replies: 23
Views: 10108

### Re: 452 - Project Scheduling

Test cases are too weak i think ... My AC code produces output 0 for
1

A 42
This case
Thu Dec 03, 2015 3:36 pm
Forum: Volume 11 (1100-1199)
Topic: 1112 - Mice and Maze
Replies: 13
Views: 7597

### Re: 1112 - Mice and Maze

Those who are getting wa are running dijkstra from target to destination but running this from u -> v but the graph should be v -> u so please reverse the input graph then run your dijkstra
Thu Apr 23, 2015 8:25 pm
Forum: Volume 119 (11900-11999)
Topic: 11906 - Knight in a War Grid
Replies: 13
Views: 7722

### Re: 11906 - Knight in a War Grid

#to_deepak
here 0,0 grid is marked as even . so if u get no answer (odd = 0 && even =0 ) then still your answer would be 1 0 .
Fri Mar 20, 2015 10:12 am
Forum: Volume 114 (11400-11499)
Topic: 11407 - Squares
Replies: 24
Views: 9229

### Re: 11407 - Squares

just used straight forward DP . And got AC on 1st go.. with in .032 sec.
Tue Mar 17, 2015 7:01 am
Forum: Volume 107 (10700-10799)
Topic: 10721 - Bar Codes
Replies: 26
Views: 12442

### Re: 10721 - Bar Codes

got ac on 1st submission actually 2D array is enough . as 'm' is not changing so we don't need 'm' as dp state
Sun Mar 15, 2015 4:18 pm
Forum: Volume 103 (10300-10399)
Topic: 10313 - Pay the Price
Replies: 42
Views: 19563

### Re: 10313 - Pay the Price

i just followed joe smith's suggestion and got ac nice explanation
Wed Mar 04, 2015 9:46 am
Forum: Volume 4 (400-499)
Topic: 481 - What Goes Up
Replies: 82
Views: 14266

### Re: 481 - What Goes Up

O(n^2) solution will get TLE so must use O(nlogk) solution.
Sun Mar 01, 2015 3:17 pm
Forum: Volume 119 (11900-11999)
Topic: 11951 - Area
Replies: 6
Views: 4408

### Re: 11951 - Area

i used O(n^4) got ac . U must prune the search space . nothing else .