A. Sagheer and Crossroads time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Sagheer is walking in the street when he comes to an intersection of two roads. Each road can be represented as two…
I used DP instead of Greedy. But got WA on PoJ, though it passed all web-searched cases. Maybe I have to use Greedy. BTW: a careless modification introduced an error, and it took me 1+ hours to debug. DETAILS Sth. about this DP solution: dp[iLake][nC…