回複:一道程序題

來源: 2009-07-23 12:30:38 [博客] [舊帖] [給我悄悄話] 本文已被閱讀:

There is always a loop: a--b--c...--a (means a need to take b's position, etc). Using this fact you can easily get a linear algorithm.