题目链接Yet another game from chef. Chef gives youNcards andMbags. Each of theNcards has an integer written on it. Now chef asks you to close your eyes an...
分类:
其他好文 时间:
2014-09-04 22:15:00
阅读次数:
291
A题给一个由a和b两种类型的字符组成的字符串,每次可以从中选取任意长度的回文子序列(不一定连续)并删除。问最少需要几次能将整个字符串为空。思路:如果本身是个回文串,那么只需要一次,否则需要两次(第一次选全部的a,第二次全部选b)。Accepted Code: 1 def is_palidrome(s...
分类:
其他好文 时间:
2014-08-31 22:38:21
阅读次数:
261
Let's consider a triangle of numbers in which a number appears in the first line, two numbers appear in the second line, three in the third line, etc....
分类:
其他好文 时间:
2014-08-28 13:03:29
阅读次数:
218
题目链接:Turbo Sort用java自带O(NlogN)的排序就可以,java要特别注意输入输出。输入用BufferedReader,输出用printWriter。printWriter的速度比System.out快很多,参考StackOverflow。代码: 1 import java.io....
分类:
其他好文 时间:
2014-08-19 12:19:14
阅读次数:
188
The most important part of a GSM network is so called Base Transceiver Station (BTS). These transceivers form the areas called cells (this term gave t...
分类:
其他好文 时间:
2014-07-31 20:22:37
阅读次数:
422
You are asked to calculate factorials of some small positive integers.InputAn integer t, 1 0){20 int num = Integer.parseInt(bf.readLine())...
分类:
其他好文 时间:
2014-07-31 20:05:57
阅读次数:
165
The purpose of this problem is to verify whether the method you are using to read input data is sufficiently fast to handle problems branded with the ...
分类:
其他好文 时间:
2014-07-31 19:39:57
阅读次数:
190
前面做了这场比赛,感觉题目不错,放上来。A题目:对于数组A[],求A[U]&A[V]的最大值,因为数据弱,很多人直接排序再俩俩比较就过了。其实这道题类似百度之星资格赛第三题XOR SUM,不过他求得是XOR最大值,原理类似。。B:KMP居然写搓了,后来一直改,题目放个链接好了:http://www....
分类:
其他好文 时间:
2014-07-29 13:29:28
阅读次数:
233
There are K nuclear reactor chambers labelled from 0 to K-1. Particles are bombarded onto chamber 0. The particles keep collecting in the chamber 0. H...
分类:
其他好文 时间:
2014-07-16 14:26:28
阅读次数:
176
Codechef July Challenge 2014部分题解,包括Garden Game和Dish Owner这两题...
分类:
其他好文 时间:
2014-07-14 18:15:59
阅读次数:
229