题意:每片雪花有六瓣,给出n片雪花,六瓣花瓣的长度按顺时针或逆时针给出,判断其中有没有相同的雪花(六瓣花瓣的长度相同)思路:如果直接遍历会超时,我试过。这里要用哈希表,哈希表的关键码key用六瓣花瓣的长度的和取余一个数得到,表中为雪花的存储位置address(即在snowflakes数组中的位置)代...
分类:
其他好文 时间:
2014-08-13 14:26:56
阅读次数:
236
异常提示:java.lang.IllegalStateException: Cannot add header view to list -- setAdapter has already been called.
产生原因:addHeaderView()调用在setAdapter()之后,并且该代码运行在Android4.3之前的系统版本。Android SDK与API Level对应表...
分类:
其他好文 时间:
2014-08-13 13:03:16
阅读次数:
338
Descriptiontwo hundred silver dollars from the loser.""Being the most powerful man in the country,the king has so nice horses that in each class his h...
分类:
其他好文 时间:
2014-08-13 12:52:16
阅读次数:
204
Problem Description
There is a forest can be seen as N * M grid. In this forest, there is some magical fruits, These fruits can provide a lot of energy, Each fruit has its location(Xi, Yi) and the en...
分类:
其他好文 时间:
2014-08-13 10:36:35
阅读次数:
214
Problem StatementThe Happy Letter game is played as follows: At the beginning, several players enter the field. Each player has a lowercase English le...
分类:
移动开发 时间:
2014-08-13 03:33:35
阅读次数:
201
Problem Description
There is a forest can be seen as N * M grid. In this forest, there is some magical fruits, These fruits can provide a lot of energy, Each fruit has its location(Xi, Yi) and the ...
分类:
其他好文 时间:
2014-08-12 22:19:04
阅读次数:
488
Problem Description
FSF has programmed a game.
In this game, players need to divide a rectangle into several same squares.
The length and width of rectangles are integer, and of course the side len...
分类:
其他好文 时间:
2014-08-12 22:06:04
阅读次数:
248
FSF’s gameProblem DescriptionFSF has programmed a game.In this game, players need to divide a rectangle into several same squares.The length and width...
分类:
其他好文 时间:
2014-08-12 21:51:44
阅读次数:
276
Jungle RoadsTime Limit:1000MSMemory Limit:10000KTotal Submissions:19265Accepted:8806DescriptionThe Head Elder of the tropical island of Lagrishan has ...
分类:
其他好文 时间:
2014-08-12 21:48:04
阅读次数:
182
Description
YH gave Qz an odd matrix consists of one or zero. He asked Qz to find a square that has the largest area. The problem is not so easy, that means the square you find must not contai...
分类:
其他好文 时间:
2014-08-12 19:11:04
阅读次数:
208