|
|
вернуться в форумПоказать все сообщения Спрятать все сообщенияWhat rules are used in sorting zeroes? Can anyone describe? It`s very interesting question. Why "a00"<"a0"? first treat all 000000 as 0 and all 00000003 as 3 compare the whole string if equals, treat 000000 < 000 and 00000003 < 003 compare the whole string again... 0000aa < 000aa < 0000ab < 000ab Our program correctly process tests like that, but we have WA2. Zeroes matters only if strings w/o them are equal. Longer leading zero sequence makes numerical sequence LESS. |
|
|