上一页 1 2 3 4 5 6 ··· 8 下一页

2019年12月30日

摘要: #include<stdio.h> #include<iostream> #include<vector> using namespace std; int n,p,k; int facMaxSum = -1; vector<int>preData,ans,tmpAns; int power(int 阅读全文
posted @ 2019-12-30 21:36 等下一班车 阅读(164) 评论(0) 推荐(0) 编辑

2019年12月28日

摘要: 题目描述: 给出两只队伍投球距离,计算最优的三分线划分,使得: 队伍一的得分减去队伍二的得分尽可能大,如果存在相同的解,取队伍一得分最大的解 思路: 将两个队伍的头球距离放在同一个坐标轴上,枚举每一个投球距离作为三分线(小于等于该距离为两分,upper_bound()返回大于该值的第一个值的位置(注 阅读全文
posted @ 2019-12-28 20:49 等下一班车 阅读(213) 评论(0) 推荐(0) 编辑

2019年12月27日

摘要: #include<string> #include<stdio.h> #include<iostream> #include<vector> using namespace std; string s1,s2; vector<int>f; void init() { f[0] = 0; f[1] = 阅读全文
posted @ 2019-12-27 22:42 等下一班车 阅读(275) 评论(0) 推荐(0) 编辑

2019年12月13日

摘要: #include<stdio.h> #include<iostream> #include<vector> #include<algorithm> using namespace std; int n; struct DATA{ int id, fid,mid , k; int num,people 阅读全文
posted @ 2019-12-13 20:25 等下一班车 阅读(247) 评论(0) 推荐(0) 编辑
 
摘要: #include<iostream> #include<vector> #include<algorithm> #include<stdio.h> // 以防万一,使用scanf时加上这个头文件 using namespace std; int n; vector<int>father,isRoot 阅读全文
posted @ 2019-12-13 16:17 等下一班车 阅读(153) 评论(0) 推荐(0) 编辑

2019年12月5日

摘要: #include<iostream> #include<vector> #include<map> #include<sstream> #include<algorithm> using namespace std; map<string ,vector<string> >title,keyword 阅读全文
posted @ 2019-12-05 21:25 等下一班车 阅读(797) 评论(0) 推荐(0) 编辑

2019年12月4日

摘要: void fun(int i,int &j,int &tmp){ int l =i,r=n; while(l<r){ int mid = (l+r)/2; if(f[mid] - f[i-1]>=m) r =mid; else l = mid +1; } j = r; tmp =f[j] - f[i 阅读全文
posted @ 2019-12-04 20:59 等下一班车 阅读(214) 评论(0) 推荐(0) 编辑
 
摘要: 阅读全文
posted @ 2019-12-04 19:05 等下一班车 阅读(6219) 评论(0) 推荐(0) 编辑

2019年12月3日

摘要: map的使用,i.first,i.second int a[23],声明0-22的数组,作为局部变量初始化a[23] ={0},a[24] 未知,全局变量都初始化为0; 格式化输出 %02d 按两位数输出 读入数据形式 aa:bb:cc:dd, scanf("%d:%d:%d:%d"); 统计费用差 阅读全文
posted @ 2019-12-03 20:32 等下一班车 阅读(141) 评论(0) 推荐(0) 编辑
 
摘要: https://blog.csdn.net/liuchuo/article/details/54428567 #include<iostream> #include<vector> #include<stdio.h> using namespace std; int n,m; vector<int> 阅读全文
posted @ 2019-12-03 15:19 等下一班车 阅读(228) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 8 下一页