https://www.acmicpc.net/problem/14698
heapify랑 곱셈 연산 해봐야 NlogN + N일텐데 최대 100만짜리 테스트케이스에서 왜 시간초과 나는건지 전혀 모르겠음..