UVa 11942: check if ordered (asc/desc)