Hello!
Regarding this line sweep problem with the editorial here my code is getting run time error on the last test case. I contacted the team support from the online judge Kattis but they did not allow me to see the test case where my code fails.
Can someone spot any mistake in my code?
Thanks a lot in advance!
EDIT: In another submission (code here) when adding "if(it==mx1.end()) continue;" in line 180 I get WA instead of RE. Plus if I loop over all elements of the multiset when set.find fails (fail = returns set.end()) I get TLE as in this code. By looping over all elements the code seem to find the segment I want, but by a "manual" manner that is not fast enough. I only get the mentioned errors in the last test case that was created by the Kattis (not created by original author — a link I left on the comments may be useful to understand the situation). Also just so you know, kattis does not allow me to share the code straight from my account there, so I need to do it by pastebin.