题解列表
bfs单点多次扩散问题(简称hp问题)
摘要:解题思路:注意事项:参考代码:# Python代码我还是补充一下八 def bfs(queue,step): for i in queue: x,y=i for j ……
解法有很多,多思考进步才会大(简单解法)
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,sum=0; scanf("%d",&a); //比如有4个小朋友分苹果,最小的……
编写题解 2247: 蓝桥杯算法提高-输出三个整数的最大数(直接进行比较)
摘要:解题思路:直接进行比较注意事项:注意交换大小后的值参考代码:import java.util.Scanner;public class T2247 { public static void main(……
1286: 最大配对
摘要: import java.util.*;
public class 最大配对 {
public static void main(String[] args) {
Scanner sc ……
筛选N以内的所有素数
摘要:解题思路:枚举每一个数字,判断是否为素数。注意事项:0和1要做特殊判断它们是非素数参考代码:#include<stdio.h>int Is_Prime(int n){ int i; if(……
优质题解
搭配购买(并查集+01背包)
摘要:#***前置知识***
### 并查集
并查集是一种数据结构,主要用于处理一些不交集合的合并及查询问题。它支持两种操作:
```cpp
合并两个集合
查询某个元素所在的集合
```
……
2857: 加密的病历单
摘要:#include<stdio.h>
#include<math.h>
#include<string.h>
# define N 100001
int check(char c)
{……
2855: 简单密码
摘要:#include<stdio.h>
#include<math.h>
#include<string.h>
# define N 100001
int main()
{
c……
2854: 密码翻译
摘要:#include<stdio.h>
#include<math.h>
#include<string.h>
# define N 100001
int main()
{
c……