随笔分类 - STL
摘要:方法一:使用二维字符数组存储,利用字符串函数比较去重 #include<bits/stdc++.h> using namespace std; int n; char a[62][3]; //注意此处第二维数组需要开3否则会出现未知错误 int cnt;//用于统计去重后的个数 int main()
阅读全文
摘要:题目链接:https://www.luogu.com.cn/problem/P4305 方法一:哈希表 #include<bits/stdc++.h> using namespace std; const int P=10007; int t, n; vector <int> hs[P]; int
阅读全文
摘要:题目链接 上网统计 思路 vector yh[1010] 的理解:yh为1010大小的数组,每个数组元素为vector 类型,样例存储方式 | cnt | yh[cnt][0] | yh[cnt][1] | yh[cnt][2] | yh[cnt][...] | | | | | | | | 0 |
阅读全文
摘要:题目链接: https://vjudge.net/problem/HDU-3527 https://www.dotcpp.com/oj/problem2064.html 题解 #include<iostream> #include<cstring> #include<cmath> #include<
阅读全文