- 博客(17)
- 收藏
- 关注
转载 斐波拉契博弈论
取石子游戏 链接http://acm.hdu.edu.cn/showproblem.php?pid=2516 Time 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
212
转载 C. Common Divisors
题目链接:https://codeforces.com/contest/1203/problem/C C. Common Divisors time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard out...
2019-08-14 16:46:00
198
转载 A. Circle of Students
题目链接:https://codeforces.com/contest/1203/problem/A A. Circle of Students time limit per test 2 seconds memory limit per test 256 megabytes input standard input output...
2019-08-14 11:01:00
220
转载 LCS 线性DP入门
C - Common Subsequence A 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
175
转载 LIS 线性DP入门
题目链接http://poj.org/problem?id=2533 B - Longest Ordered Subsequence A numeric sequence ofaiis ordered ifa1<a2< ... <aN. Let the subsequence of the given numeric sequence (a1...
2019-08-13 17:29:00
213
转载 数塔 DP入门
A - 数塔 在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的:有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?已经告诉你了,这是个DP的题目,你能AC吗? Input输入数据首先包括一个整数C,表示测试实例的个数,每个测试实例的第一行是一个整数N(1 <= N <= 100),表示数塔的...
2019-08-13 15:38:00
206
转载 Codeforces Round #442 (Div. 2) B
题目链接:http://codeforces.com/contest/877/problem/B B. Nikita and string time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard out...
2019-08-13 14:27:00
143
转载 C++ lower_bound 与 upper_bound 函数(二分查找)
注意:使用lower_bound 与 upper_bound 函数前序列一定要保证是有序的 //lower_bound(起始地址,结束地址,要查找的数值) 返回大于或等于val的第一个元素位置,返回类型为迭代器 //upper_bound(起始地址,结束地址,要查找的数值)返回大于val的第一个元素位置,返回迭代器 //binary_search(起始地址,结束地址,...
2019-08-13 11:21:00
158
转载 关于做题
1. 多组输入要确定每一次输入数据之间要重新初始化 2.杭电题目一定要注意多组输入 3.一定要仔细读题,读题目给定的变量范围,读清题目的意思 转载于:https://www.cnblogs.com/1911087165zzx/p/11344256.html...
2019-08-13 10:18:00
111
转载 关于一些零碎的注意问题
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
151
转载 getline使用问题
1.输入string string s1; getline(cin,s1); cin>>s1; //注意cin遇到空格会终止,而getline不会 2.关于吞回车问题 输入n后要记得吞回车,不然只能输入两个字符串就结束 cin>>n; getchar();//加getchar()把输入n时的回车吃掉 getline(c...
2019-08-13 08:45:00
447
转载 D - Olya and Energy Drinks (CodeForces - 877D)
题目链接https://codeforces.com/contest/877/problem/D Olya 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
338
转载 线段树 杭电6315
Naive Operations Time Limit: 6000/3000 MS (Java/Others)Memory Limit: 502768/502768 K (Java/Others)Total Submission(s): 5061Accepted Submission(s): 2167 Problem Description In a galaxy ...
2019-08-11 12:00:00
109
转载 [CodeForces - 950D]A Leapfrog in the Array
Description 题目地址:Codeforces D. A Leapfrog in the Array time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output Dima...
2019-07-27 19:14:00
159
转载 codeforces.com/contest/1196/problem/C
http://codeforces.com/contest/1196/problem/C C. Robot Breakout time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard ou...
2019-07-25 10:17:00
383
转载 差分数组
转载自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
261
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅