简易1044c++方法 摘要:解题思路:使用set排序,但是set会删除重复数据,所以使用multiset参考代码:#include <iostream>#include<set>#include<i…… 题解列表 2025年03月23日 0 点赞 0 评论 237 浏览 评分:0.0
选择排序:简单实现 摘要:解题思路:使用注意事项://此题有坑!//1.测试数据有多组!!!!//2.数据点2猜测包含有100个char的名字,因此name需要分配101的空间参考代码:#include<stdio.h&…… 题解列表 2025年03月24日 0 点赞 0 评论 296 浏览 评分:0.0
景区导游(LCA详解) 摘要:#include<bits/stdc++.h>using namespace std;typedef long long ll;const int N = 1e5 + 5;int fa[N…… 题解列表 2025年03月24日 0 点赞 0 评论 283 浏览 评分:0.0
c++最优乘车dijsktra(BFS) 摘要:解决输入情况:核心:string line和getline(cin,line)和istringstream iss(line);此时iss可以跳过空格读取这一行的数据string s;iss>>s;…… 题解列表 2025年03月25日 0 点赞 0 评论 159 浏览 评分:0.0
字符串的翻转条件判定 摘要:解题思路:找到合适反转的条件注意事项:注意边界问题,别超数组参考代码:import java.util.Scanner;public class test { public …… 题解列表 2025年03月25日 0 点赞 0 评论 233 浏览 评分:0.0
最短路径(bellman-ford) 摘要:```c#include #include using namespace std;const int INF=0x3f3f3f3f;struct Node{ int…… 题解列表 2025年03月25日 0 点赞 0 评论 165 浏览 评分:0.0
c++热浪(贪心+优先队列) 摘要:```cpp#include #include using namespace std;const int INF=0x3f3f3f3f;int T,C,Ts,Te;vec…… 题解列表 2025年03月25日 0 点赞 0 评论 143 浏览 评分:0.0
数列排序- 模拟+数组元素移动 摘要:解题思路:模拟+数组元素移动+插入数组注意事项:参考代码:#include<iostream>usingnamespacestd;constin…… 题解列表 2025年03月25日 0 点赞 0 评论 241 浏览 评分:0.0
数列有序:极简(不用数组,输入时同时输出) 摘要:解题思路:极简,输入时同时输出注意事项:参考代码:#include<bits/stdc++.h>usingnamespacestd;consti…… 题解列表 2025年03月25日 0 点赞 0 评论 154 浏览 评分:0.0
C++:map容器 算暴力遍历 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<map>using namespace std ;int main ( ){&n…… 题解列表 2025年03月25日 0 点赞 0 评论 134 浏览 评分:0.0