![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
要补的题和知识点
文章平均质量分 62
percation
快乐coding,coding快乐~
展开
-
2021.10.10 CCPC网络选拔赛(重赛)补题
B题1002#include <bits/stdc++.h>using namespace std;#define ll long longll t,a,b,c,x0,x1,y0,y1,y2;int main(){ cin >> t; while(t--){ cin >> a >> b >> c; cin >> x0 >> x1 >> y0 >> y1 >> y2原创 2021-10-14 00:21:44 · 207 阅读 · 0 评论 -
关于 vector 中的 clear()
关于 vector 中的 clear()//the text about vector's clear(); #include <iostream>#include <cstdio>#include <vector>using namespace std;int main(){ vector<int> a; //定义一个a数组 for(int i = 1; i <= 5; i++){ a.push_back(i);//将 i 的原创 2020-10-05 21:24:19 · 356 阅读 · 0 评论 -
upper_bound and lower_bound
lower_bound( )和upper_bound( )都是利用二分查找的方法在一个有序数组中进行查找的。在从小到大的排序数组中lower_bound( begin,end,num):从数组的begin位置到end-1位置二分查找第一个大于或等于num的数字,找到则返回该数字的地址,不存在则返回end。通过返回的地址减去起始地址begin,得到找到数字在数组中的下标。upper_bound( begin,end,num):从数组的begin位置到end-1位置二分查找第一个大于num的数字,找到则返转载 2020-10-03 14:08:31 · 102 阅读 · 0 评论