参考:https://blog.csdn.net/Hk_john/article/details/72463318 以下是内容: 最近经常用到vector容器,发现它的clear()函数有点意思,经过验证之后进行一下总结。 clear()函数的调用方式是,vector temp(50);//定义了5 ...
分类:
其他好文 时间:
2021-04-29 12:05:53
阅读次数:
0
链接:https://pintia.cn/problem-sets/994805046380707840/problems/1336215880692482060 思路: 代码: #include<bits/stdc++.h> using namespace std; vector<int>ve[1 ...
分类:
其他好文 时间:
2021-04-24 13:26:55
阅读次数:
0
考个研真的把很多东西都忘光了,,, #include <string_view> #include <iostream> #include <string> #include <algorithm> #include <vector> using namespace std; class Sampl ...
分类:
其他好文 时间:
2021-04-23 12:18:50
阅读次数:
0
排序思路 头函数 algorithm 中有一个函数是 upper_bound(start,end,value) 它可以返回区间 [start,end] 中第一个大于等于 value 的值的位置 再加上 vector 中自带的插入函数 insert(space,value) 就可以对数据进行类似于二分 ...
分类:
编程语言 时间:
2021-04-23 12:12:05
阅读次数:
0
思路: 通过把二维矩阵转化为一维来求解,我们的一维并不是对矩阵处理,一维数组是一列的元素和。 首先我们定义上边界,上边界从第一行开始,然后创建一个数组,每一个上边界创建一次数组,然后再定义一个下边界,从上边界的位置开始。然后求解上下边界组成的矩阵中第0列到最后一列的每一列和。 因为矩阵还需要有左右边 ...
分类:
其他好文 时间:
2021-04-23 12:08:39
阅读次数:
0
水题。 int h[]={129,130}; int w[]={25,27}; int main() { int T; cin>>T; while(T--) { int sex,height,weight; cin>>sex>>height>>weight; vector<string> res; ...
分类:
其他好文 时间:
2021-04-23 11:57:55
阅读次数:
0
Span one vector to a line Let \(\mathbf{v}\) be a nonzero vector in \(\mathbb{R}^{3} .\) Then \(\operatorname{Span}\{\mathbf{v}\}\) is the set of all ...
分类:
其他好文 时间:
2021-04-22 16:15:07
阅读次数:
0
1.记录索引交换 class Solution { public: int minSwapsCouples(vector<int>& row) { int len=row.size(); vector<int> idx(len,-1); int ret=0; for(int i=0;i<len;++ ...
分类:
其他好文 时间:
2021-04-22 15:12:46
阅读次数:
0
CROSS_COMPILE = aarch64-himix100-linux_V630- CC = $(CROSS_COMPILE)gcc CPLUS = $(CROSS_COMPILE)g++ INC_DIR = -I./alg_test/inc CFLAGS = -Wall $(INC_DIR) ...
分类:
编程语言 时间:
2021-04-21 12:45:32
阅读次数:
0
\(\text{Problem}:\)第一类斯特林数·列 \(\text{Solution}:\) 与计算第二类斯特林数一列的方法类似的,设 \(F(x)\) 表示第 \(1\) 列第一类斯特林数的 \(\text{EGF}\),有: \[ F(x)=\sum\limits_{i=1}^{\inft ...
分类:
其他好文 时间:
2021-04-21 11:45:50
阅读次数:
0