题解列表
c++最优乘车dijsktra(BFS)
摘要:解决输入情况:核心:string line和getline(cin,line)和istringstream iss(line);此时iss可以跳过空格读取这一行的数据string s;iss>>s;……
蓝桥杯2024年第十五届省赛真题-封闭图形个数
摘要:#include #include int ff(int a){ int tem=0; int sum=0; int flag=a; while(a>0) { ……
字符串的翻转条件判定
摘要:解题思路:找到合适反转的条件注意事项:注意边界问题,别超数组参考代码:import java.util.Scanner;public class test { public ……
最短路径(bellman-ford)
摘要:```c#include #include using namespace std;const int INF=0x3f3f3f3f;struct Node{ int……
c++热浪(贪心+优先队列)
摘要:```cpp#include #include using namespace std;const int INF=0x3f3f3f3f;int T,C,Ts,Te;vec……
数列排序- 模拟+数组元素移动
摘要:解题思路:模拟+数组元素移动+插入数组注意事项:参考代码:#include<iostream>usingnamespacestd;constin……
数列有序:极简(不用数组,输入时同时输出)
摘要:解题思路:极简,输入时同时输出注意事项:参考代码:#include<bits/stdc++.h>usingnamespacestd;consti……
C++:map容器 算暴力遍历
摘要:解题思路:注意事项:参考代码:#include<iostream>#include<map>using namespace std ;int main ( ){&n……
c++分糖果(dijkstra求最短最远距离)
摘要:解题思路:要保证所有孩子吃完糖果,那不就意味着一定是求从起点到最远的距离且点与点之间的权值为1,相当于最远距离+最后一个孩子吃完的时间+题意描述给予第一个孩子的时间为1(the_most_far_di……