摘要: Problem DescriptionFew know that the cows have their own dictionary with W (1 ≤ W ≤ 600) words, each containing no more 25 of the characters 'a'..'z'. Their cowmunication system, based on mooing, is not very accurate; sometimes they hear words that do not make any sense. For instance 阅读全文
posted @ 2013-08-09 10:11 persistent codeants 阅读(288) 评论(0) 推荐(0)
摘要: 1523. K-inversionsTime limit: 1.0 second Memory limit: 64 MBConsider a permutationa1,a2, …,an(allaiare different integers in range from 1 ton). Let us callk-inversiona sequence of numbersi1,i2, …,iksuch that 1≤i1ai2>…>aik. Your task is to evaluate the number of differentk-inversions in a given 阅读全文
posted @ 2013-08-09 08:10 persistent codeants 阅读(209) 评论(0) 推荐(0)