How often does someone get the same place in IOI two times in the row? (except winner like Benq)
I was solving this task: https://oj.uz/problem/view/IOI17_mountains. The first submission got 20 points (brute-force using bitsets). The second submission got 70 points because I used memoization. After that, I wrote my own bitset with custom hash and got 100! Can someone suggest why the number of different bitsets is $$$O(n^2)$$$?
I was solving this problem and after I solved it by myself I decided to implement editorial's solution. Strangely my first submission was really slow 55982450, but after changing the order of dimensions it got 5x faster 55999256.