随笔分类 -  STL

摘要:方法一:使用二维字符数组存储,利用字符串函数比较去重 #include<bits/stdc++.h> using namespace std; int n; char a[62][3]; //注意此处第二维数组需要开3否则会出现未知错误 int cnt;//用于统计去重后的个数 int main() 阅读全文
posted @ 2024-10-29 15:17 TFLSNOI 阅读(213) 评论(1) 推荐(0) 编辑
摘要:题目链接: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 阅读全文
posted @ 2023-02-18 18:59 TFLSNOI 阅读(35) 评论(0) 推荐(0) 编辑
摘要:题目链接 上网统计 思路 vector yh[1010] 的理解:yh为1010大小的数组,每个数组元素为vector 类型,样例存储方式 | cnt | yh[cnt][0] | yh[cnt][1] | yh[cnt][2] | yh[cnt][...] | | | | | | | | 0 | 阅读全文
posted @ 2022-10-13 09:53 TFLSNOI 阅读(50) 评论(0) 推荐(0) 编辑
摘要:题目链接: https://vjudge.net/problem/HDU-3527 https://www.dotcpp.com/oj/problem2064.html 题解 #include<iostream> #include<cstring> #include<cmath> #include< 阅读全文
posted @ 2022-10-12 16:49 TFLSNOI 阅读(258) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示