编写题解 2002: 计算数字个数(Python) 摘要:解题思路:题解一:通过遍历字符串判断字符是否为数字参考代码:n=input() s1=0 for i in n: if i.isdigit(): s1+=1 prin…… 题解列表 2024年03月05日 0 点赞 0 评论 273 浏览 评分:0.0
蓝桥杯2023年第十四届省赛真题-冶炼金属 摘要:#include<iostream> using namespace std; const int MAX_N = 1e4 + 1; // 规定数据范围不超 int N, A[MAX_N], B…… 题解列表 2024年03月05日 0 点赞 0 评论 649 浏览 评分:9.9
平方差python解 摘要:解题思路:只有当x为奇数或4的倍数时才能拆分为两个数的平方差。注意事项:x-(x//2)求奇数的个数x//4求4的倍数的个数为了计算范围 [L, R] 内满足条件的数目,减去 f(L-1) 的目的是排…… 题解列表 2024年03月05日 0 点赞 1 评论 466 浏览 评分:6.0
java两种方式题解 动态规划、深度搜索(题目测试数据有坑,输入数据中有大于n的数据,会导致数组越界) 摘要: import java.util.*; public class Main { //1567 public static void main(String[] args) {…… 题解列表 2024年03月05日 0 点赞 0 评论 195 浏览 评分:9.9
台球碰撞问题 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<math.h>//调用数学库函数//使用三角函数注意事项://1、包含头文件…… 题解列表 2024年03月05日 0 点赞 0 评论 273 浏览 评分:0.0
图的遍历-BFS广度优先搜索(C++) 摘要:解题思路:#include<iostream> using namespace std; #define MAX_VERTEX_NUM 50 // 定义最大结点数; #define MAXQSI…… 题解列表 2024年03月05日 0 点赞 0 评论 336 浏览 评分: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 评论 281 浏览 评分: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 评论 285 浏览 评分:9.9
出差,dij算法 摘要:解题思路:使用图dijistra算法,根据题目进行一点变形即可注意事项:注意算法时间复杂度,以及一些小细节,代码中都有详细注释参考代码:#include<bits/stdc++.h>#define M…… 题解列表 2024年03月05日 0 点赞 0 评论 465 浏览 评分: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 评论 230 浏览 评分:0.0