
其他
文章平均质量分 73
WedyZhou
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Codeforces Round #362 (Div. 2) C.Lorenzo Von Matterhorn
题目链接:http://codeforces.com/contest/697/problem/C题意:有1~n的n个点,对于第i个点它的2*i与2*i+1有一条无向的边。现在有两种操最,第一种是将从u到v的最短路径上所有边的 权值加上w。第二种是询问u到v最短路劲上的花费是多少。解法:我们可以将从1开始将所有的边画出来,不难发现这就是一棵二叉树。他们的最短路径即为他们到公共父亲的距离。然后原创 2016-07-16 20:25:44 · 309 阅读 · 0 评论 -
刽子手(Hangman Judge, UVA 489)
Hangman JudgeTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescriptionIn ``Hangman Judge,'' you are to write a program tha原创 2015-08-24 15:52:22 · 326 阅读 · 0 评论 -
B. Longtail Hedgehog
B. Longtail Hedgehogtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThis Christmas Santa gave Masha a magic picture原创 2016-01-22 21:30:15 · 604 阅读 · 0 评论 -
学习总结(大数运算,简单dp,线段树,并查集,最短路)
断断续续的搞ACM已经有一段时间,现在对已经学过的做个总结。一.大数对于爆long long 的数据,首先用字符传读入,然后按照运算规则一位一位的处理。1.加法HDU1002 http://acm.hdu.edu.cn/showproblem.php?pid=1002#include#include#include#includeusing na原创 2016-03-12 12:30:21 · 394 阅读 · 0 评论 -
612 C. Wet Shark and Flowers
C. Wet Shark and Flowerstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n sharks who grow flowers for Wet原创 2016-03-23 14:54:49 · 396 阅读 · 0 评论 -
codeforce 621 B. Wet Shark and Bishops
B. Wet Shark and Bishopstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputToday, Wet Shark is given n bishops on a10原创 2016-03-23 17:25:20 · 402 阅读 · 0 评论 -
关于二分(upper_bound,lower_bound)
STL中关于二分查找的函数有三个lower_bound 、upper_bound 、binary_search 。这三个函数都运用于有序区间如果寻找的值存在,那么lower_bound返回一个迭代器指向其中第一个这个元素。upper_bound返回一个迭代器指向其中最后一个这个元素的下一个位置(明确点说就是返回在不破坏顺序的情况下,可插入值的最后一个位置)。如果寻找的value不存在,那么lowe原创 2016-03-25 16:05:31 · 374 阅读 · 0 评论 -
coderforce Educational Codeforces Round 10 C. Foe Pairs(贪心)
C. Foe Pairstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a permutation p of lengthn. Also you are原创 2016-03-26 14:57:47 · 508 阅读 · 0 评论 -
Codeforces Round #347 (Div. 2) A. Complicated GCD
题目链接:http://codeforces.com/contest/664/problem/A题意:输入两个整数a,b,求a,a+1,a+2,........b的最大公约数。a,b不超过100位数解法: 当a==b时,公约数是他本身。当a!= b时,公约数为1。总结:对于英文题,看清题目在做,,,,有时候读懂了题就变简单了AC:#include #include #i原创 2016-04-17 11:34:59 · 460 阅读 · 0 评论 -
Codeforces Round #347 (Div. 2) B Rebus (贪心构造)
B. Rebustime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a rebus of form ? + ? - ? + ? = n, consisting o原创 2016-04-17 20:55:34 · 1144 阅读 · 3 评论 -
Educational Codeforces Round 12 A. Buses Between Cities
A. Buses Between Citiestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBuses run between the cities A and B原创 2016-04-25 20:06:59 · 525 阅读 · 0 评论 -
G. Heavy Coins(二进制枚举)
G. Heavy CoinsBahosain has a lot of coins in his pocket. These coins are really heavy, so he always tries to get rid of some ofthe coins by using them when paying for the taxi.Whenever Bahosain原创 2016-04-29 16:09:52 · 668 阅读 · 0 评论 -
Codeforces Round #350 (Div. 2) C Cinema
C. Cinematime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMoscow is hosting a major international conferenc原创 2016-05-06 15:20:30 · 742 阅读 · 0 评论 -
Codeforces Round #350 (Div. 2) D1,D2Magic Powder(二分)
D2. Magic Powder - 2time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe term of this problem is the same as原创 2016-05-06 20:23:43 · 629 阅读 · 0 评论 -
Codeforces Round #361 (Div. 2) C. Mike and Chocolate Thieves 二分
题目链接:http://codeforces.com/problemset/problem/689/C题意:有4个小偷去偷Mike家的巧克力,小偷的包最多装n个。四个小偷一个比一个贪心,他们偷的是前一个的k倍(k不知道)。现在已经知道小偷可能出现的情况次数为m(1e15)。问你求出小偷包的最小容量。解法:设第一个小偷偷了a,则很容易这道小偷包的容量为所有情况中a*k*k*k的最大值。枚举k原创 2016-07-12 21:13:15 · 320 阅读 · 0 评论 -
递推
1580: 递推专项训练(3)Time Limit:1000MS Memory Limit:65536KBTotal Submit:11 Accepted:5 Page View:265Submit Status DiscussDescription从原点出发,一步只能向右走、向上走或向左走。恰好走N步且不经过已走的点共有多少种走法?N范围均为 [1。。。转载 2015-10-21 19:35:53 · 466 阅读 · 0 评论