I am getting WA in TOWCNT. I also stress tested my code against accepted code on various self generated testcases, still there are no difference between the outputs of the two.

TestCase Generator : Link
Few TestCase : Link to testcases
My Code : Code

Please help, I am totally lost.

@smartnj @rajarshi_basu Help.

overflow see my comment below

1 Like

I am using long long all along.( defining int as long long). Can you please provide me test case where it is failing? @galencolin

Found it.

3 2
0 1 1
1 1 2

You’re ignoring things with the same x.

1 Like

Thanks Galen. Great help.

hey can anyone give me a tough test case for that problem

But no two obstacles intersects each other as per constraints of problem.
Hence, probably we should not care of it …

See the test cases again, they are not intersecting (even though they are on same x).

1 Like

I got it :slight_smile: