03 2020 档案

摘要:C. First Last Sorting链接:https://nanti.jisuanke.com/t/44141 阅读全文
posted @ 2020-03-29 20:48 John-C 阅读(126) 评论(0) 推荐(0)
摘要:Cupboard and Balloons CodeForces - 342C 找到不变的点 抓住不确定的点进行讨论 #include<iostream> #include<cmath> using namespace std; int main() { double r,h; cin>>r>>h; 阅读全文
posted @ 2020-03-25 16:44 John-C 阅读(220) 评论(0) 推荐(0)
摘要:#include<iostream>#include<map> using namespace std;map<int,int> x;map<int,int> y;map<pair<int,int>,int> xy;int main(){ int n; cin>>n; for(int i=0;i<n 阅读全文
posted @ 2020-03-22 22:38 John-C 阅读(161) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/qq_42957923/article/details/90107840 阅读全文
posted @ 2020-03-22 22:36 John-C 阅读(98) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/wuyudong/p/cpp-map.html 阅读全文
posted @ 2020-03-22 22:21 John-C 阅读(107) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-03-14 14:16 John-C 阅读(111) 评论(0) 推荐(0)
摘要:#include<iostream> #include<algorithm> #include<stdio.h> #include<string.h> #include<stdlib.h> using namespace std; void makeNext(char s[],int next[]) 阅读全文
posted @ 2020-03-10 16:08 John-C 阅读(126) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-03-10 14:57 John-C 阅读(207) 评论(0) 推荐(0)
摘要:利用sort(s.begin(),s.end()); 不能用sort(s,s+lengrh()); 阅读全文
posted @ 2020-03-09 18:28 John-C 阅读(1205) 评论(0) 推荐(1)
摘要:1.sort(a,a+n) //排序函数 不用多说了 2. tolower() 函数是把字符串都转化为小写字母 touppre() 函数是把字符串都转化为大写字母 3. next_permutation(a,a+n) //全排列函数 next_permutation函数 组合数学中经常用到排列,这里 阅读全文
posted @ 2020-03-09 18:25 John-C 阅读(366) 评论(0) 推荐(0)
摘要:题目大意:设有N堆沙子排成一排,其编号为1,2,3,…,N(N<=300)。每堆沙子有一定的数量,可以用一个整数来描述,现在要将这N堆沙子合并成为一堆,每次只能合并相邻的两堆,合并的代价为这两堆沙子的数量之和,合并后与这两堆沙子相邻的沙子将和新堆相邻,合并时由于选择的顺序不同,合并的总代价也不相同, 阅读全文
posted @ 2020-03-08 17:14 John-C 阅读(202) 评论(0) 推荐(0)
摘要:0x3f3f3f3f的十进制是1061109567,是10^9级别的(和0x7fffffff一个数量级),而一般场合下的数据都是小于10^9的,所以它可以作为无穷大使用而不致出现数据大于无穷大的情形。 另一方面,由于一般的数据都不会大于10^9,所以当我们把无穷大加上一个数据时,它并不会溢出(这就满 阅读全文
posted @ 2020-03-08 12:23 John-C 阅读(438) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-03-01 15:29 John-C 阅读(209) 评论(0) 推荐(0)
摘要:标准代码如下: #include<iostream> #include<cstdio> #include<cmath> using namespace std; #define inf 0x3f3f3f int ans=-inf,dp; int main() { int n; cin>>n; for 阅读全文
posted @ 2020-03-01 11:13 John-C 阅读(145) 评论(0) 推荐(0)