上一页 1 2 3 4 5 6 7 ··· 12 下一页
摘要: D. Sweets for Everyone!time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputFor he knew every Who down in Whoville beneath, Was busy now, hanging a mistletoe wreath. "And they're hanging their stockings!" he snarled with a sneer, "T 阅读全文
posted @ 2012-11-28 19:32 YogyKwan 阅读(303) 评论(0) 推荐(0) 编辑
摘要: A. Paper Work模拟:从左到右扫一遍,每组一旦出现第三个负数就新开一组B. Restoring IPv6模拟:根据“::”分情况讨论C. Movie Critics贪心:连续相同的视为一段,每段两端相同,该段权重+2,否则+1。最后找权重最大的去掉即可D. Building Bridge计算几何:通过相似得到x2上没点在x1上对应的坐标,然后在x1的点组里二分找到该坐标左右位置,对于x2上每点只要计算这两个位置跟它对应即可,边扫边找最小E. Mad Joe模拟:遍历每一层时,设置两个参量表示左右边界,重复的路直接通过左右边界的距离来叠加,复杂度m*n4CROC-MBTU 2012, 阅读全文
posted @ 2012-11-28 19:22 YogyKwan 阅读(196) 评论(0) 推荐(0) 编辑
摘要: A. Cupboards模拟:两列的最小值相加B. Chilly Willy数论:结尾可以找到循环规律C. Robo-Footballer计算几何:使球达到位置为y1+r,然后此时用三角形关系判断是否撞了y2的柱子D. Sweets for Everyone!模拟:列出一个初始值时,通过贪心思想,有就给,没有就去该点的跳转位置(通过队列预处理得到),最后再反过来扫一遍,找到使得时间最少的方法。通过二分初始值,得到答案。E. Piglet's Birthday神题:研究中,附链接http://codeforces.com/contest/248/problem/E3Codeforces 阅读全文
posted @ 2012-11-28 19:07 YogyKwan 阅读(321) 评论(0) 推荐(0) 编辑
摘要: Trim the NailsTime Limit:2 Seconds Memory Limit:65536 KBRobert is clipping his fingernails. But the nail clipper is old and the edge of the nail clipper is potholed.The nail clipper's edge isNmillimeters wide. And we useNcharacters('.' or '*') to represent the potholed nail clipp 阅读全文
posted @ 2012-11-25 17:40 YogyKwan 阅读(219) 评论(0) 推荐(0) 编辑
摘要: D.Japanese Mahjong I模拟:枚举每张牌加入,判断是否能组成4*3+2的模式F.Japanese Mahjong III模拟:直接判断是否七对或十三烂G.Gao The Sequence贪心:转化为差数组上的操作。从后往前扫,若目前节余值t加上剩余的差之和仍然当前扫到的差,则NO。一直没有NO就是YES。I.Search in the Wiki暴力:直接用stl的set_intersection判断交集J.Trim the Nailsbfs:每次用没有用过的方式去剪指甲,结果为0,即指甲剪光了就结束45 jingg.cxy4100284 (1)0105 (1)00265 (2) 阅读全文
posted @ 2012-11-25 17:22 YogyKwan 阅读(286) 评论(0) 推荐(0) 编辑
摘要: E. Blood Cousins Returntime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarpus got hold of a family tree. The found tree describes the family relations ofnpeople, numbered from 1 ton. Every person in this tree has at most one direct ancestor. 阅读全文
posted @ 2012-11-23 23:26 YogyKwan 阅读(534) 评论(0) 推荐(0) 编辑
摘要: A. Buggy Sorting贪心:只要n>2,则令最前两个为2,后面都为1B. Increase and Decrease贪心:若所有元素相加整除元素个数n,则为n,否则为n-1C. Beauty Pageant暴力:用vector存枚举到每个元素的当前所有解,没加入一个新元素,更新vector,知道个数等于kD. Colorful Graph图论:输入边时,将对应点加入,最后枚举一遍颜色,取最大E. Blood Cousins Return树:将节点按深度用vector分别存储,递归时每个节点的头\末位置分别记录,搜索v的k儿子时,利用头、末位置调用lower_bound()函数对 阅读全文
posted @ 2012-11-22 10:55 YogyKwan 阅读(261) 评论(0) 推荐(0) 编辑
摘要: C. Beauty Pageanttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGeneral Payne has a battalion ofnsoldiers. The soldiers' beauty contest is coming up, it will last forkdays. Payne decided that his battalion will participate in the pageant. No 阅读全文
posted @ 2012-11-22 10:47 YogyKwan 阅读(416) 评论(0) 推荐(0) 编辑
摘要: A. System Administrator模拟:直接计算同类第一项相加是否大于等于总和的一半B. Internet Address字符串:关键在于找"ru"C. Game with Coins贪心:保证堆数为奇数,且最后的两堆一定要先取D. Restoring Table位运算:按32位分别做,生成1的两者都为1E. Mishap in Club模拟:能利用已经存在的人就利用,否则重新加人F. Log Stream Analysis模拟:枚举每个事件,它之后的第num-1个的时间减去该事件时间是否<timeG. Suggested Friends图论:用map和v 阅读全文
posted @ 2012-11-21 20:13 YogyKwan 阅读(345) 评论(0) 推荐(1) 编辑
摘要: G. Suggested Friendstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarpus works as a programmer in a start-up social network. His boss gave his a task to develop a mechanism for determining suggested friends. Polycarpus thought much about th 阅读全文
posted @ 2012-11-21 19:53 YogyKwan 阅读(411) 评论(0) 推荐(1) 编辑
上一页 1 2 3 4 5 6 7 ··· 12 下一页