The present application relates to compounds represented by general formula (I), general formula (II) or general formula (III), and pharmaceutically acceptable salts or hydrates thereof, preparation methods thereof, and pharmaceutical compositions thereof. The compounds represented by general formula (I), general formula (II) or general formula (III) have inhibitory activities against isocitrate dehydrogenase 2 (IDH2), thereby being capable of treating IDH2 mutation-induced cancers.