BOJ 13352 - Target practice: https://www.acmicpc.net/problem/13352

물론 정해는 (확률 없이) O(n).


예전에 코드포스 문제도 하나 있었는데 그건 기억이 안난다.