BAT2 - BATMAN2
Alfred: "I'll get this to Mr. Fox, but no more. I've sewn you up, I've set your bones, but I won't bury you. I've buried enough members of the Wayne family."
After being promised the software to erase her criminal record, Catwoman agrees to take Batman to Bane. They manage to defeat all of Bane's men but ended up heading into a MAZE trap. Bane would call this maze as the LIS MAZE. He would hide himself in one of the rooms. Each of these rooms have a number (tag) associated with it. The speciality of the maze is that once you enter any room it will only lead you to rooms with a higher tag in the direction you move. Batman and Catwoman decide to move in opposite directions trying their luck to maximize the number of rooms they search. (They can start with any room, need not be the same)
Catwoman: "Never steal from someone you can't outrun, kid."
t, number of testcases.
n, number of rooms.
n integers giving the tag associated with the rooms.
The maximum number of rooms searched.
1 < = n < = 100
Input: 1 6 5 3 4 6 1 2 Output: 5
are the tags unique?
anyone managed to submit AC in python?
Here's how to submit 2 ACs within 5 sec -
Please refrain from discussing the logic in the comments.
AC in 1 go:-)
Same as BORW.
my 100th ^_^Last edit: 2016-12-30 05:48:01
Good problem for dp...AC in one go 0.00 sec :)
@susi_45 In the given test case BATMAN goes this way 5 <- 3 <- 1 and Catwoman goes this way 4 -> 6 .
Can someone please explain the test case.