Comments

Regarding problem E. Two Platforms, I used TreeMap to solve. Them time complexity is also O(N log N), but it is TLE. I got stuck on investigating the cause. Could anyone help me to have a look? thanks.

https://mirror.codeforces.com/contest/1409/submission/91911507

Your task is to choose the maximum by size (the number of segments) subset of the given set of segments such that each pair of segments in this subset either non-intersecting or one of them lies inside the other one.

what does this statement mean? so confused. ><

Regarding problem F, I can't figure out how does it mean. The first example↓, why the output is 3? In my understanding, it should be 1, because only (2,3) or (2,4) can be chosen. Otherwise, we will have the intersecting, ex: (2,4) & (2,3) have intersecting. input: 4 1 5 2 4 2 3 3 4 output: 3 Is there anyone can help? THANKS.

@popabogdannnn can you show your code? My implementation failed based on your idea.

thank you! very helpful