[信息学奥赛一本通T1541-数列区间最大值] ST表 摘要:# 线段树常数大了得加点小细节才能过(~~反正我没过~~),静态询问嘛,就用ST表就行 ```cpp #include #define ULL unsigned long long #defi…… 题解列表 2024年10月22日 0 点赞 0 评论 228 浏览 评分:9.9
蓝桥杯2024年第十五届省赛真题-封闭图形个数(C++) 摘要:解题思路:不使用结构体,而使用vector向量作为不同个数封闭图形的存放处,好处就是不限制同一个数封闭图形的次数。注意事项:sort(num[i].begin(), num[i].end());是对每…… 题解列表 2024年10月22日 1 点赞 0 评论 788 浏览 评分:9.9
亲戚 并查集+人数求和 摘要: #include using namespace std; const int MAXN = 100010; int fa[MAXN], size[MAXN];…… 题解列表 2024年10月21日 1 点赞 0 评论 305 浏览 评分:9.9
亲戚 并查集+人数求和 摘要: #include using namespace std; int n,m,a,b; char c; struct relation …… 题解列表 2024年10月21日 0 点赞 0 评论 211 浏览 评分:9.9
搭配购买(buy) 并查集+01背包dp问题 摘要: #include using namespace std; const int N = 1e4 + 5; int father[N]; int valu…… 题解列表 2024年10月21日 1 点赞 0 评论 226 浏览 评分:9.9
题可以贪心做,人要看准了爱. 摘要:# 权重 = 价值 / 重量 就是先拿(价值/重量)权重最大的, 最后拿不下了就分割(权重*剩下背包重量)拿走就行了 ```cpp #include #define ULL unsign…… 题解列表 2024年10月21日 0 点赞 2 评论 322 浏览 评分:9.9
[金银岛]自定义排序优先'均权'最大--我看题解都太复杂辣 摘要:# 贪心 自定义排序找均权值最大 #### 好久没发题解了。。。 ##### 核心思路:通过价值/重量 得到单位价值 ###### 按照单位价值从大到小得顺序装 直到装不下为止 ##…… 题解列表 2024年10月20日 0 点赞 1 评论 388 浏览 评分:9.9
优质题解 团伙(group) 并查集 摘要: #include using namespace std; int n,m; int o,p,q; int father[1001]; int…… 题解列表 2024年10月20日 173 点赞 0 评论 3031 浏览 评分:9.9
2878: 计算矩阵边缘元素之和 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N=2e3;ll a…… 题解列表 2024年10月20日 0 点赞 0 评论 923 浏览 评分:0.0
2881: 图像相似度 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N=2e3;ll a…… 题解列表 2024年10月20日 1 点赞 0 评论 306 浏览 评分:0.0