|
0
Instead of direct solutions some hints would have been better. Anyways nice problems and quick editorial! <3 |
|
0
Spent the whole time optimizing my indexed_multiset in C, only to realise just after the contest that binary searching the answer is sufficient. :( Nice bugaboos btw! |
|
0
Logic of my submission is also similar, just instead of free bits I put 1 at each such position. Can it be hacked? |
|
+12
Travel parallel to x-axis first to reach the x coordinate and then travel parallel to y-axis or vice-versa to reach the final destination. This way it can be done in at max 2 moves |
|
0
Can you please explain how that is fast enough in bit more detail |
|
0
Wonderful analogy! |
|
+3
No they wont be. Why? Hope it helps :) |
|
+3
No it is not necessary. Reason |
|
+4
Actually it was not so unfair since you required just one observation for C. Hint Reason |
|
0
Thanks for that |
|
0
Same here. Tried different greedy approaches. Even my code works for the mentioned case. Sometimes you just dont know what you are missing. But yeah the brute force approach was cool. |
|
0
Break condition is required when we have painted either all the rows or all the columns since after that final colour of a query would remain same. Remember |
|
+3
Just naming a container as dp doesn't make the solution be a dp solution! |
|
+1
Was stuck in C for quite some time. Dropping by few hints for whosoever interested Hint 1 Hint 2 Hint 3 |