알고리즘/BOJ
[BOJ] 14897번: 서로 다른 수와 쿼리 1
BaaaaaaaaaaaaaaaaaaaaaaarkingDog
2019. 9. 8. 21:18
https://www.acmicpc.net/problem/14897
직관적으로는 Mo's algorithm으로 해결할 수 있고, merge sort tree 혹은 persistent segment tree로도 해결할 수 있다고 합니다.(https://www.acmicpc.net/board/view/40731)
저는 Mo's algorithm으로 해결했습니다.