蓝桥杯2023年第十四届省赛真题-冶炼金属 摘要:#include<iostream> using namespace std; const int MAX_N = 1e4 + 1; // 规定数据范围不超 int N, A[MAX_N], B…… 题解列表 2024年03月05日 0 点赞 0 评论 645 浏览 评分:9.9
平方差python解 摘要:解题思路:只有当x为奇数或4的倍数时才能拆分为两个数的平方差。注意事项:x-(x//2)求奇数的个数x//4求4的倍数的个数为了计算范围 [L, R] 内满足条件的数目,减去 f(L-1) 的目的是排…… 题解列表 2024年03月05日 0 点赞 1 评论 454 浏览 评分:6.0
java两种方式题解 动态规划、深度搜索(题目测试数据有坑,输入数据中有大于n的数据,会导致数组越界) 摘要: import java.util.*; public class Main { //1567 public static void main(String[] args) {…… 题解列表 2024年03月05日 0 点赞 0 评论 182 浏览 评分:9.9
台球碰撞问题 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<math.h>//调用数学库函数//使用三角函数注意事项://1、包含头文件…… 题解列表 2024年03月05日 0 点赞 0 评论 264 浏览 评分:0.0
图的遍历-BFS广度优先搜索(C++) 摘要:解题思路:#include<iostream> using namespace std; #define MAX_VERTEX_NUM 50 // 定义最大结点数; #define MAXQSI…… 题解列表 2024年03月05日 0 点赞 0 评论 329 浏览 评分:0.0
蓝桥杯2022年第十三届省赛真题-数位排序 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int i,n,m,t,s; cin>>n>>m…… 题解列表 2024年03月05日 0 点赞 0 评论 275 浏览 评分:0.0
dp和dfs两种解法(java) 摘要:参考代码:import java.util.*;public class Main { static int n; static int[][]g=new int[26][26]; static in…… 题解列表 2024年03月05日 0 点赞 0 评论 267 浏览 评分:9.9
出差,dij算法 摘要:解题思路:使用图dijistra算法,根据题目进行一点变形即可注意事项:注意算法时间复杂度,以及一些小细节,代码中都有详细注释参考代码:#include<bits/stdc++.h>#define M…… 题解列表 2024年03月05日 0 点赞 0 评论 457 浏览 评分:9.9
合法C标识符 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ string s; cin>>s; for(int i=0;…… 题解列表 2024年03月05日 0 点赞 0 评论 223 浏览 评分:0.0
二分查找求方案数 (最大值) 摘要:二分查找 巧克力划分的方案数 (最大值) ```c++ #include using namespace std; const int N = 1e5+10; typedef long …… 题解列表 2024年03月05日 0 点赞 0 评论 246 浏览 评分:0.0