![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
其他
文章平均质量分 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 · 270 阅读 · 0 评论 -
刽子手(Hangman Judge, UVA 489)
Hangman Judge Time Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %llu Submit Status Description In ``Hangman Judge,'' you are to write a program tha原创 2015-08-24 15:52:22 · 298 阅读 · 0 评论 -
B. Longtail Hedgehog
B. Longtail Hedgehog time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output This Christmas Santa gave Masha a magic picture原创 2016-01-22 21:30:15 · 569 阅读 · 0 评论 -
学习总结(大数运算,简单dp,线段树,并查集,最短路)
断断续续的搞ACM已经有一段时间,现在对已经学过的做个总结。 一.大数 对于爆long long 的数据,首先用字符传读入,然后按照运算规则一位一位的处理。 1.加法 HDU1002 http://acm.hdu.edu.cn/showproblem.php?pid=1002 #include #include #include #include using na原创 2016-03-12 12:30:21 · 356 阅读 · 0 评论 -
612 C. Wet Shark and Flowers
C. Wet Shark and Flowers time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output There are n sharks who grow flowers for Wet原创 2016-03-23 14:54:49 · 356 阅读 · 0 评论 -
codeforce 621 B. Wet Shark and Bishops
B. Wet Shark and Bishops time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Today, Wet Shark is given n bishops on a 10原创 2016-03-23 17:25:20 · 367 阅读 · 0 评论 -
关于二分(upper_bound,lower_bound)
STL中关于二分查找的函数有三个lower_bound 、upper_bound 、binary_search 。这三个函数都运用于有序区间如果寻找的值存在,那么lower_bound返回一个迭代器指向其中第一个这个元素。upper_bound返回一个迭代器指向其中最后一个这个元素的下一个位置(明确点说就是返回在不破坏顺序的情况下,可插入值的最后一个位置)。如果寻找的value不存在,那么lowe原创 2016-03-25 16:05:31 · 331 阅读 · 0 评论 -
coderforce Educational Codeforces Round 10 C. Foe Pairs(贪心)
C. Foe Pairs time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given a permutation p of length n. Also you are原创 2016-03-26 14:57:47 · 462 阅读 · 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 · 435 阅读 · 0 评论 -
Codeforces Round #347 (Div. 2) B Rebus (贪心构造)
B. Rebus time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given a rebus of form ? + ? - ? + ? = n, consisting o原创 2016-04-17 20:55:34 · 1095 阅读 · 3 评论 -
Educational Codeforces Round 12 A. Buses Between Cities
A. Buses Between Cities time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Buses run between the cities A and B原创 2016-04-25 20:06:59 · 487 阅读 · 0 评论 -
G. Heavy Coins(二进制枚举)
G. Heavy Coins Bahosain has a lot of coins in his pocket. These coins are really heavy, so he always tries to get rid of some of the coins by using them when paying for the taxi. Whenever Bahosain原创 2016-04-29 16:09:52 · 580 阅读 · 0 评论 -
Codeforces Round #350 (Div. 2) C Cinema
C. Cinema time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Moscow is hosting a major international conferenc原创 2016-05-06 15:20:30 · 690 阅读 · 0 评论 -
Codeforces Round #350 (Div. 2) D1,D2Magic Powder(二分)
D2. Magic Powder - 2 time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output The term of this problem is the same as原创 2016-05-06 20:23:43 · 585 阅读 · 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 · 274 阅读 · 0 评论 -
递推
1580: 递推专项训练(3) Time Limit:1000MS Memory Limit:65536KB Total Submit:11 Accepted:5 Page View:265 Submit Status Discuss Description 从原点出发,一步只能向右走、向上走或向左走。恰好走N步且不经过已走的点共有多少种走法? N范围均为 [1。。。转载 2015-10-21 19:35:53 · 431 阅读 · 0 评论