try this
1 4 2
2 21
4 14 25 2
13 21
your output=1000
ac output=20
1 Like
That was a nice catch…
Thanks, but I altered the code, few cases got right, but some are still wrong:
https://www.codechef.com/viewsolution/49452060
1 Like
find lower bound for start time
and upper bound for end time
compare and find minimum of all values which is possible
i implemented solution by use of TreeSet in java
https://www.codechef.com/viewsolution/49452665