狡兔 k 窟-bfs 摘要:解题思路:要求两个点之间的最点距离,同时属于同一个洞窟的点他们之间的距离为0那么该问题可以转换为求解两个洞窟的最短距离依次构建的图是关于洞窟的而不是点例如1 3 2 1 2 3:1和4点都属于1号洞窟…… 题解列表 2025年04月11日 0 点赞 0 评论 254 浏览 评分:0.0
链表代码参考如下 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;struct node{ int data; …… 题解列表 2025年04月11日 0 点赞 0 评论 292 浏览 评分:0.0
暴力写法优化 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ long re=0; …… 题解列表 2025年04月11日 0 点赞 0 评论 181 浏览 评分:0.0
zsbdzsbdzsbdzsbdzsbdzsbd 摘要:参考代码:n=int(input())data=[int(i)foriininput().split…… 题解列表 2025年04月11日 0 点赞 0 评论 170 浏览 评分:0.0
二分的题型,注意二分什么和结束条件 摘要:import sysinput=lambda:sys.stdin.readline().strip()n,m=map(int,input().split())f=[[0]*2 for i in ran…… 题解列表 2025年04月11日 0 点赞 0 评论 154 浏览 评分:0.0
蓝桥杯2025年第十六届省赛真题-电池分组 摘要: 题解:分割数组使子数组异或值相等------#### 解题思路:1. **异或性质**: - 如果整个数组的异或值为 0,那么数组可以被分割成任意数量的子数…… 题解列表 2025年04月12日 2 点赞 0 评论 666 浏览 评分:0.0
简单的暴力 摘要:解题思路:注意事项:这个a数组我考试,以为只有100个 ,想了一下应该是100*100 所以数组应该开1000以上参考代码:#include<bits/stdc++.h>using nam…… 题解列表 2025年04月13日 0 点赞 0 评论 329 浏览 评分:0.0
行编辑程序代码Stack两种思路 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ string str;…… 题解列表 2025年04月13日 0 点赞 0 评论 196 浏览 评分:0.0
两种方法:不用deque和使用deque 摘要:解题思路:注意事项:参考代码:#include <cassert>#include <cctype>#include <cerrno>#include <cf…… 题解列表 2025年04月13日 0 点赞 0 评论 133 浏览 评分:0.0
:自动晾衣机 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a[1000]; int…… 题解列表 2025年04月13日 0 点赞 0 评论 169 浏览 评分:0.0