I recently tried to solve Div 3 D problem and keep on getting Runtime error on 5th case. Not able to figure out the reason behind it.
https://codeforces.net/contest/999/submission/39512943 (link for the submission)
https://codeforces.net/contest/999/problem/D (link for the problem)
Diagnostics actually shows the reason.
Error: attempt to subscript container with out-of-bounds index 0, but container only holds 0 elements.
With all respect, I don't know much about out of bound error. Is that something related to the fact that I'm trying to access the index which is actually not allowed??
Yes, you are trying to access 0th element of some vector when it's actually empty.
Thanks a lot for your attention.