![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
sicily
文章平均质量分 75
light_14
这个作者很懒,什么都没留下…
展开
-
Sicily 1148 过河
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB Description在河上有一座独木桥,一只青蛙想沿着独木桥从河的一侧跳到另一侧。在桥上有一些石子,青蛙很讨厌踩在这些石子上。由于桥的长度和青蛙一次跳过的距离都是正整数,我们可以把独木桥上青蛙可能到达的点看成数轴上的一串整点:0,1,……,L(其中L是桥的长度)。坐标为0的点表示原创 2016-03-12 18:22:54 · 1185 阅读 · 0 评论 -
Sicily 1327 Pinary
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB Description``Pinary" number is a positive number using only two digits ``0" and ``1" with usual rule that it must not begin with a 0, and the原创 2015-03-10 14:40:48 · 336 阅读 · 0 评论 -
Sicily 1176 Two Ends
ConstraintsTime Limit: 1 secs, Memory Limit: 64 MB DescriptionIn the two-player game "Two Ends", an even number of cards is laid out in a row. On each card, face up, is written a positive inte原创 2015-02-13 14:58:42 · 291 阅读 · 0 评论 -
Sicily 1006 Team Rankings
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionIt's preseason and the local newspaper wants to publish a preseason ranking of the teams in the local amateur basketball league. T原创 2015-02-14 16:51:14 · 317 阅读 · 0 评论 -
Sicily 1022 Poor contestant Prob
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionAs everybody known, “BG meeting” is very very popular in the ACM training team of ZSU.After each online contest, they will go原创 2015-02-14 15:17:56 · 597 阅读 · 0 评论 -
Sicily 1193 Up the Stairs
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionJohn is moving to the penthouse of a tall sky-scraper. He packed all his stuff in boxes and drove them to the entrance of the bu原创 2015-02-16 17:04:25 · 614 阅读 · 0 评论 -
Sicily 1209 Sequence Sum Possibi
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionMost positive integers may be written as a sum of a sequence of at least two consecutive positive integers. For instance,6 = 1原创 2015-02-13 20:18:37 · 337 阅读 · 0 评论 -
Sicily 1210 二叉树
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB Description在众多的数据结构中,二叉树是一种特殊而重要的结构,有着广泛的应用。二叉树或者是一个结点,或者有且仅有一个结点为二叉树的根,其余结点被分成两个互不相交的子集,一个作为左子集,另一个作为右子集,每个子集又是一个二叉树。遍历一棵二叉树就是按某条搜索路径巡访其中每原创 2015-02-13 18:46:52 · 1642 阅读 · 1 评论 -
Sicily 1166 Computer Transformat
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionA sequence consisting of one digit, the number 1 is initially written into a computer. At each successive time step, the computer原创 2015-02-13 17:07:48 · 296 阅读 · 0 评论 -
Sicily 1140 国王的遗产
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB Description哈丁国的国王一生善于管理,勤于政务,在国家里聚积了大量的财富。但他众多的孩子都不争气,相互间时常勾心斗角,却没有一个真正能接受国王传位的人。为了避免将来某儿子一人独揽大权,又出于不能让权力过度分散的考虑,临终前,国王作了一个决定:国王他将一生的财富打造出了一条原创 2016-03-16 13:28:34 · 1524 阅读 · 0 评论 -
Sicily 1099 Packing Passengers
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionPTA, Pack ‘em Tight Airlines is attempting the seemingly impossible—to fly with only full planes and still make a profit. Their st原创 2016-03-16 13:39:41 · 284 阅读 · 0 评论 -
Sicily 1047 Super Snooker
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionOn one of my many interplanetary travels I landed on a beautiful little planet called Crucible. It was inhabited by an extremely p原创 2016-03-11 22:07:33 · 328 阅读 · 0 评论 -
Sicily 1013 Going Home
ConstraintsTime 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, either horizontal原创 2016-03-11 19:41:51 · 385 阅读 · 0 评论 -
Sicily 1049 Mondriaan
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionSquares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One day, while working on his latest project, he was in原创 2016-03-21 16:25:52 · 315 阅读 · 0 评论 -
Sicily 1345 能量项链
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB Description在Mars星球上,每个Mars人都随身佩带着一串能量项链。在项链上有N颗能量珠。能量珠是一颗有头标记与尾标记的珠子,这些标记对应着某个正整数。并且,对于相邻的两颗珠子,前一颗珠子的尾标记一定等于后一颗珠子的头标记。因为只有这样,通过吸盘(吸盘是Mars人吸收能原创 2016-03-21 16:11:19 · 802 阅读 · 0 评论 -
Sicily 1045 Space Management
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionThe new general manager Gill Bates has been to a seminar on time management. Ever since she has been bothering all of her staff to原创 2016-03-21 15:57:24 · 270 阅读 · 0 评论 -
Sicily 1488 矩阵取数游戏
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB Description帅帅经常跟同学玩一个矩阵取数游戏:对于一个给定的n*m的矩阵,矩阵中的每个元素aij均为非负整数。游戏规则如下:1. 每次取数时须从每行各取走一个元素,共n个。m次后取完矩阵所有元素;2. 每次取走的各个元素只能是该元素所在行的行首或行尾;原创 2016-03-09 17:32:18 · 311 阅读 · 0 评论 -
Sicily 1005 Roll Playing Games
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionPhil Kropotnik is a game maker, and one common problem he runs into is determining the set of dice to use in a game. In many curre原创 2016-03-08 16:48:04 · 486 阅读 · 0 评论 -
Sicily 1008 Translations
DescriptionBob Roberts is in charge of performing translations of documents between various languages. To aidhim in this endeavor his bosses have provided him with translation files. These files com原创 2016-03-07 20:51:59 · 480 阅读 · 0 评论 -
Sicily 1153 马的周游问题[Special judge] && sicily 1152
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB , Special Judge Description和题目C同样的任务,这里只是把棋盘扩大到标准的国际象棋。对这样一个8 * 8的棋盘用同样的方法编号如下:1 2 3 4 5 6 7 89 10原创 2015-02-25 14:06:40 · 365 阅读 · 0 评论 -
Sicily 2013 Pay Back
ConstraintsTime Limit: 1 secs, Memory Limit: 256 MB Description"Never a borrower nor a lender be." O how Bessie wishes she had taken that advice! She has borrowed from or lent money to each of原创 2015-02-26 14:07:20 · 529 阅读 · 0 评论 -
POJ 2479 Maximum sum && sicily 1090
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionGiven a set of n integers: A={a1, a2,..., an}, we define a function d(A) as below: t1 t2原创 2015-02-25 17:03:56 · 275 阅读 · 0 评论 -
Sicily 1935 二叉树重建
数据结构的简单题,对帮助理解二叉树的遍历蛮有帮助的。#include #include using namespace std;struct node{ char val; node * left; node * right;};node * build(int n, char * pre, char * in){ //注意strchr返回的是指向那个原创 2015-02-04 23:45:42 · 248 阅读 · 0 评论 -
Sicily 6084 Times17
简单的二进制乘法计算,注意到二进制中有位移的存在,那么乘以17可以变成乘以(16+1),16=2^4,那么左移四位加上原来的数字就是答案啦~#include #include using namespace std;char s[1015];int ans[1018];int main(){ int i, j, len; cin >> s;原创 2015-02-03 20:01:41 · 367 阅读 · 0 评论 -
Sicily 1137 河床
数据比较小,直接暴力枚举就ok啦。#include using namespace std;int d[30005];int main(){ int i, j, n, k, max, min, maxlen = 0; cin >> n >> k; for (i = 0; i > d[i]; for (i = 0; i <原创 2015-02-03 16:17:43 · 301 阅读 · 0 评论 -
Sicily 1119 Factstone Benchmark
题目大意是根据年份,求出是2的m次方,求满足n!#include #include using namespace std;int bit(int year){ return (int)pow(2, (year - 1940) /10 );}int main(){ int year, chip_bits; while (cin >> year原创 2015-02-02 22:46:00 · 274 阅读 · 0 评论 -
Sicily 1134 积木分发
简单的贪心题,先取需要最少的,让手中的积木不断变多。#include #include using namespace std;struct littleChildren{ int block_in_hand; int block_need;}child[10005];bool comp(littleChildren a, littleChildren b) {原创 2015-02-03 16:15:44 · 328 阅读 · 0 评论 -
Sicily 1004 I Conduit!
是一道比较坑的几何题目,题目大意就是给出一些线段,问最少画多少笔可以把他们都连起来。注意double的误差,还有斜率的判断,有一些线段重叠的也要特殊处理,最后总的变数减去重复的就是答案啦。#include #include #include #include using namespace std;struct segment{ double x1, y1, x2,原创 2015-02-02 17:46:18 · 757 阅读 · 0 评论 -
Sicily 2002 Feeding Time
简单的图遍历问题,我一开始用dfs,结果750*750的数据就爆栈空间了,改用bfs就AC了。#include #include #include using namespace std;int w, h, d[855][855], vis[855][855], ans;void deal(int x, int y, queue & q)//判断是否合法,是否访问过,然原创 2015-02-02 20:50:39 · 330 阅读 · 0 评论 -
Sicily 1001 Alphacode
题目大意是给出一个序列,问有多少种解码方法。这种问题可以从子问题的解得到问题的解,是典型dp的标志。#include#includechar st[5005];int arr[5005];int main(){ int i, len; while (scanf("%s",st) != EOF && st[0] != '0') {原创 2015-02-02 17:43:06 · 337 阅读 · 0 评论 -
Sicily 2010 H Number
大意是要找出符合规律的数字,数据量不大,穷举即可。#include#includebool hNumber(int n);int main(){ int i,n,count=0; scanf("%d",&n); for (i = 1; i <= n; i++) if (hNumber(i)) count++; printf("%d\n",count); r原创 2015-02-05 22:33:08 · 257 阅读 · 0 评论 -
Sicily 1031 Campus
大意就是求出两个地点的最短路。简单的单源最短路问题,我用的是优先队列实现的dijkstra算法,离散数学教的~注意题目的陷阱,输入数据的坑就好啦。#include #include #include #include #define MAXN 205#define INF 100000000using namespace std;int d[MAXN];原创 2015-02-07 17:22:16 · 342 阅读 · 0 评论 -
Sicily 1077 Cash Machine && POJ 1276
ConstraintsTime Limit: 10 secs, Memory Limit: 32 MB DescriptionA Bank plans to install a machine for cash withdrawal. The machine is able to deliver appropriate bills for a requested cash amou原创 2015-02-24 13:15:12 · 370 阅读 · 0 评论 -
Sicily 1221 数字游戏
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB Description小W发明了一个游戏,他在黑板上写出了一行数字a1,a2,….an,然后给你m个回合的机会,每回合你可以从中选择一个数擦去它,接着剩下来的每个数字ai都要递减一个值bi。如此重复m个回合,所有你擦去的数字之和就是你所得到的分数。 小W和他的好朋友小原创 2015-02-25 18:44:49 · 1191 阅读 · 0 评论 -
UVALive 4244 Party Party Party(HDU 2779 && Sicily 1663)
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionEmma has just graduated high school and it is the custom for the new graduates to throw parties for themselves and invite everyone原创 2015-02-23 20:41:03 · 523 阅读 · 0 评论 -
Sicily 1158 Pick numbers
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionGiven a matrix of size M*N, the elements of which are integer numbers from -10 to 10. You task is to go from the top-left corner (原创 2015-02-17 21:56:58 · 289 阅读 · 0 评论 -
Sicily 1305 Who’s Winner?
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionNic and Susan play the game of multiplication by multiplying an integer p by one of the numbers 2 to 9. Nic always starts with p=1原创 2015-02-22 15:37:24 · 339 阅读 · 0 评论 -
Sicily 1282 Computer Game
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionBrian is an enthusiast of computer games, especially those that simulate virtual reality. Now he is in front of the Star Gate. In原创 2015-02-17 19:44:32 · 406 阅读 · 0 评论 -
Sicily 2011 Nine Digits
ConstraintsTime Limit: 2 secs, Memory Limit: 256 MB Description Nine tiles, each with a number from 1 to 9 on it, are packed into a 3 by 3 frame. Your task is to arrange the tiles so that they a原创 2015-02-08 19:28:33 · 379 阅读 · 0 评论 -
Sicily 1750 运动会
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionZEH是一名04级的学生,他除了绩点高,还有运动细胞。有一次学院举办运动会,ZEH发现里面的项目都是他所向披靡的,当然他想获得所有项目的No1,但是一个人的精力总是有限的,ZEH也是只有P(Power的简写,一个大于0且小于1000的整数)的精力。如果精力足够原创 2015-02-08 17:52:21 · 839 阅读 · 0 评论