- 博客(17)
- 收藏
- 关注
转载 斐波拉契博弈论
取石子游戏链接http://acm.hdu.edu.cn/showproblem.php?pid=2516Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10199Accepted Submission(s):...
2019-08-31 19:28:00 120
转载 C. Common Divisors
题目链接:https://codeforces.com/contest/1203/problem/CC. Common Divisorstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard out...
2019-08-14 16:46:00 117
转载 A. Circle of Students
题目链接:https://codeforces.com/contest/1203/problem/AA. Circle of Studentstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutput...
2019-08-14 11:01:00 132
转载 LCS 线性DP入门
C - Common SubsequenceA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2, ..., xm> another sequence Z = <...
2019-08-13 19:57:00 100
转载 LIS 线性DP入门
题目链接http://poj.org/problem?id=2533B - Longest Ordered SubsequenceA numeric sequence ofaiis ordered ifa1<a2< ... <aN. Let the subsequence of the given numeric sequence (a1...
2019-08-13 17:29:00 125
转载 数塔 DP入门
A - 数塔在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的:有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?已经告诉你了,这是个DP的题目,你能AC吗?Input输入数据首先包括一个整数C,表示测试实例的个数,每个测试实例的第一行是一个整数N(1 <= N <= 100),表示数塔的...
2019-08-13 15:38:00 131
转载 Codeforces Round #442 (Div. 2) B
题目链接:http://codeforces.com/contest/877/problem/BB. Nikita and stringtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard out...
2019-08-13 14:27:00 65
转载 C++ lower_bound 与 upper_bound 函数(二分查找)
注意:使用lower_bound 与 upper_bound 函数前序列一定要保证是有序的//lower_bound(起始地址,结束地址,要查找的数值) 返回大于或等于val的第一个元素位置,返回类型为迭代器//upper_bound(起始地址,结束地址,要查找的数值)返回大于val的第一个元素位置,返回迭代器//binary_search(起始地址,结束地址,...
2019-08-13 11:21:00 95
转载 关于做题
1. 多组输入要确定每一次输入数据之间要重新初始化2.杭电题目一定要注意多组输入3.一定要仔细读题,读题目给定的变量范围,读清题目的意思转载于:https://www.cnblogs.com/1911087165zzx/p/11344256.html...
2019-08-13 10:18:00 62
转载 关于一些零碎的注意问题
1.关于scanf与printf的返回值1. scanf 函数是有返回值的,它的返回值可以分成三种情况 1) 正整数,表示正确输入参数的个数。例如执行 scanf("%d %d", &a, &b); 2) 0,表示用户的输入不匹配,无法正确输入任何值。如上例,用户如果输入",3 4",返回0。 3) EOF,这是在 stdi...
2019-08-13 10:02:00 84
转载 getline使用问题
1.输入stringstring s1;getline(cin,s1);cin>>s1; //注意cin遇到空格会终止,而getline不会2.关于吞回车问题输入n后要记得吞回车,不然只能输入两个字符串就结束cin>>n;getchar();//加getchar()把输入n时的回车吃掉getline(c...
2019-08-13 08:45:00 342
转载 D - Olya and Energy Drinks (CodeForces - 877D)
题目链接https://codeforces.com/contest/877/problem/DOlya loves energy drinks. She loves them so much that her room is full of empty cans from energy drinks.Formally, her room can be represented...
2019-08-12 20:32:00 171
转载 线段树 杭电6315
Naive OperationsTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 502768/502768 K (Java/Others)Total Submission(s): 5061Accepted Submission(s): 2167Problem DescriptionIn a galaxy ...
2019-08-11 12:00:00 65
转载 [CodeForces - 950D]A Leapfrog in the Array
Description题目地址:CodeforcesD. A Leapfrog in the Arraytime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputDima...
2019-07-27 19:14:00 86
转载 codeforces.com/contest/1196/problem/C
http://codeforces.com/contest/1196/problem/CC. Robot Breakouttime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard ou...
2019-07-25 10:17:00 279
转载 差分数组
转载自COLIN·GAO链接https://www.cnblogs.com/COLIN-LIGHTNING/p/8436624.html一、差分数组的定义及用途1.定义:对于已知有n个元素的离线数列d,我们可以建立记录它每项与前一项差值的差分数组f:显然,f[1]=d[1]-0=d[1];对于整数i∈[2,n],我们让f[i]=d[i]-d[i-1]。2.简单性质...
2019-07-24 17:48:00 180
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人