二级C语言-计算素数和 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int m,n,sum=0;//声明整型变量m、n和sum,初始化sum为0,用于储存素数之和。 s…… 题解列表 2024年03月18日 0 点赞 0 评论 216 浏览 评分:0.0
2518: 信息学奥赛一本通T1620-质因数分解 摘要:参考代码:import math n = int(input()) arr = [] for i in range(2, int(math.sqrt(n))+1): if n % i…… 题解列表 2024年03月18日 0 点赞 0 评论 154 浏览 评分:0.0
数据结构-Floyd(弗洛伊德)最短路径算法(C++)模板改 摘要:**直接输入邻接矩阵时的folyd最短路径,注意输出时将无穷大置为-1,否者会超出限制** ```cpp #include #include #include using namespace…… 题解列表 2024年03月18日 0 点赞 0 评论 205 浏览 评分:0.0
p进制转换q进制 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>using namespace std;int m;char c[]={'0',&#…… 题解列表 2024年03月18日 0 点赞 0 评论 241 浏览 评分:0.0
3110: 最短路(Spfa)(C++)运用模板/防止时间超限 摘要:**本题数据量较大,要注意防止时间超出限制,时间极限的情况下,使用scanf/printf进行输入输出耗时更短** ```cpp #include #include #include #…… 题解列表 2024年03月18日 0 点赞 0 评论 310 浏览 评分:0.0
比较好想到的思路就是--先把白的放好并把白的放的位置标记,然后dfs黑的是不能放到放白的时候标记过的 摘要:参考代码:import java.util.*;public class Main { static boolean[]c=new boolean[10]; static boolean[]djx=n…… 题解列表 2024年03月18日 0 点赞 0 评论 167 浏览 评分:0.0
又臭又长的dp写法--新手 摘要:参考代码:import java.util.*;public class Main { public static void main(String[]args) { Scanner sc = new…… 题解列表 2024年03月18日 0 点赞 0 评论 202 浏览 评分:0.0
蓝桥杯2022年第十三届省赛真题-求和(C++) 摘要:#include <iostream> using namespace std; const int N = 200000; int main() { int n = 0; …… 题解列表 2024年03月18日 1 点赞 0 评论 181 浏览 评分:0.0
2813 (C语言) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int m,n,a,b=0; scanf("%d",&m); scanf("%d",&n); …… 题解列表 2024年03月18日 0 点赞 0 评论 137 浏览 评分:0.0
2814 (C语言) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,a,b,m=0,c=0; scanf("%d",&n); for(int i=0;…… 题解列表 2024年03月19日 0 点赞 0 评论 207 浏览 评分:0.0