
sicily
笃笃前行
努力多一点,成就也会多一点
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
1006. Team Rankings
1006. Team Rankings Constraints Time Limit: 1 secs, Memory Limit: 32 MB Description It's preseason and the local newspaper wants to publish a preseason ranking of the teams in the local amateur原创 2014-11-27 16:15:40 · 239 阅读 · 0 评论 -
sicily 1022---可用于大数据排序查找中位数(非常快)--优先队列
#include #include #include #include #include #include using namespace std; struct Student { char name_[15]; int solve; } stu; struct Greater { bool operator() (Student a,转载 2014-12-26 00:18:22 · 351 阅读 · 0 评论 -
1018. A Card Trick
#include #include #include #include #define n 5 using namespace std; struct Card { string str; char color; char value; int order; int col_order; } card[100]; bool cmp(Card a, Card b) { if原创 2014-12-24 15:26:12 · 193 阅读 · 0 评论 -
1012. Stacking Cylinders
1012. Stacking Cylinders Constraints Time Limit: 1 secs, Memory Limit: 32 MB Description Cylinders (e.g. oil drums) (of radius 1 foot) are stacked in a rectangular bin. Each cylinder on an uppe原创 2014-12-08 13:51:22 · 255 阅读 · 0 评论 -
sicily 1011. Lenny's Lucky Lotto
1011. Lenny's Lucky Lotto Constraints Time Limit: 1 secs, Memory Limit: 32 MB Description Lenny likes to play the game of lotto. In the lotto game, he picks a list of N unique numbers in the r原创 2014-12-07 19:20:53 · 287 阅读 · 0 评论 -
1014. Specialized Four-Dig
1014. Specialized Four-Dig Constraints Time Limit: 1 secs, Memory Limit: 32 MB Description Find and list all four-digit numbers in decimal notation that have the property that the sum of its fo原创 2014-12-17 13:45:26 · 268 阅读 · 0 评论 -
1010. Zipper
1010. Zipper Constraints Time Limit: 1 secs, Memory Limit: 32 MB Description Given three strings, you are to determine whether the third string can be formed by combining the characters in the原创 2014-12-04 23:36:36 · 178 阅读 · 0 评论 -
1009. Mersenne Composite N
1009. Mersenne Composite N Constraints Time Limit: 1 secs, Memory Limit: 32 MB Description One of the world-wide cooperative computing tasks is the "Grand Internet Mersenne Prime Search" -- GIM原创 2014-12-04 21:19:01 · 210 阅读 · 0 评论 -
1007 TO and Fro
1007. To and Fro Constraints Time Limit: 1 secs, Memory Limit: 32 MB Description Mo and Larry have devised a way of encrypting messages. They first decide secretly on the number of columns and原创 2014-12-04 10:36:48 · 199 阅读 · 0 评论 -
sicily1013. Going Home
1013. Going Home Constraints Time Limit: 10 secs, Memory Limit: 32 MB Description On a grid map there are n little men and n houses. In each unit time, every little man can move one unit step,原创 2014-12-16 23:54:57 · 218 阅读 · 0 评论 -
sicily.1004 I conduit
1004. I Conduit! Constraints Time Limit: 3 secs, Memory Limit: 32 MB Description Irv Kenneth Diggit works for a company that excavates trenches, digs holes and generally tears up people's yards原创 2014-11-26 17:28:43 · 222 阅读 · 0 评论 -
sicily 1002. Anti-prime Sequences
/****************************************** *sicily 1002. Anti-prime Sequences *解题思路:先用素数筛选法选出素数。在用DFS 进行回溯查找,从第一个开始放,符合则继续放下一个,否则返回; *直到所有数放完为止,放完返回true,否则返回false; * 此题和八皇后问题的原理是一样的。 ***********转载 2014-11-24 14:02:25 · 318 阅读 · 0 评论 -
sicily1935 树的重建(已知树的先序遍历和中序遍历输出树的广度优先遍历)
1935. 二叉树重建 Constraints Time Limit: 1 secs, Memory Limit: 32 MB Description 对于二叉树T,可以递归定义它的先序遍历、中序遍历和后序遍历如下: PreOrder(T)=T的根节点+PreOrder(T的左子树)+PreOrder(T的右子树) InOrder(T)=InOrder(T的左子树)+T的根节点+转载 2014-12-14 21:24:36 · 459 阅读 · 0 评论