Atcoder ABC123 English Editorial D help ?
Hey , Can anyone please tell how to solve D of today's atcoder beginner contest
Link here
How to efficently brute it ?
Any help will be appreciated
CF Edu Round #165 Solution Discussion
Educational Round 165 Solution Discussion (with myself)