LightOJ – False Ordering

Problem Name: False Ordering
Judge: LightOJ
Algorithms & DS: NOD, Custom Sorting