[信息学奥赛一本通T1487-北极通讯网络] - DFS求连通块 +二分答案 或 Kruskal 摘要:## DFS求连通块 +二分答案```cpp#include // #define int long long // 仅在需要大整数时使用,memset 数组为 0x3f 时去掉#de…… 题解列表 2025年02月19日 1 点赞 0 评论 153 浏览 评分:0.0
[信息学奥赛一本通T1488-新的开始] - 虚拟原点求最小生成树 摘要:```cpp#include #define int long long // 仅在需要大整数时使用,memset 数组为 0x3f 时去掉#define INF 0x3f3f3f3f…… 题解列表 2025年02月19日 0 点赞 0 评论 160 浏览 评分:0.0
贪心,选出前m个最大翻转可增加的值 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <algorithm>#include <cstring>#include &…… 题解列表 2025年02月19日 1 点赞 1 评论 800 浏览 评分:10.0
[连接格点(grid)] - Kruskal 摘要:### 先跑横向再跑纵向```cpp#include #define int long long // 仅在需要大整数时使用,memset 数组为 0x3f 时去掉#define …… 题解列表 2025年02月19日 0 点赞 0 评论 195 浏览 评分:0.0
高精度阶乘和(简写) 摘要:解题思路:1、定义数组a用来存储阶乘,s存储阶乘和,逆序存储值(初始值为1,a[1]=1,长度len为1),循环时只需将乘数i乘以a的每个位数即可。2、将a的每一位进位计算,当a[len]产生…… 题解列表 2025年02月18日 2 点赞 0 评论 334 浏览 评分:10.0
我直接ifififif 摘要:```cpp#include #include using namespace std;int main(){ string s; int a[50]={0},…… 题解列表 2025年02月18日 0 点赞 0 评论 182 浏览 评分:0.0
优先队列解法 摘要:解题思路:1. 使用优先队列来优化选择窗口的操作,优先队列(小顶堆)的特性可以保证每次堆顶元素就是当前空闲时间最早(即空闲时间最短)的窗口&…… 题解列表 2025年02月18日 1 点赞 0 评论 157 浏览 评分:10.0
最容易想到的解法了 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>#include<stdio.h>using namespace std;i…… 题解列表 2025年02月18日 0 点赞 0 评论 111 浏览 评分:0.0
stricmp用不了,换普通解法 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>#include<stdio.h>using namespace std;i…… 题解列表 2025年02月18日 0 点赞 0 评论 128 浏览 评分:0.0
分解质因数 一种用素数判断 一种无需判断 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;//判断是否是素数bool check(int …… 题解列表 2025年02月17日 0 点赞 0 评论 165 浏览 评分:0.0