1011: [编程入门]最大公约数与最小公倍数 摘要:参考代码:#include<bits/stdc++.h>using namespace std;typedef int ll;ll n,m;int main(){ cin>>n>>m; int mx=…… 题解列表 2024年08月24日 0 点赞 1 评论 293 浏览 评分:9.9
1492 蓝桥杯算法提高VIP-产生数 摘要:解题思路:无注意事项:无参考代码:#include<iostream>#include<cstring>using namespace std;int tag[10][10],d[10],p[1000…… 题解列表 2024年08月24日 0 点赞 0 评论 271 浏览 评分:10.0
铺地毯 利用二维数组 易懂 摘要:解题思路:利用二维数组形成矩阵,答案中感觉比较少提到这种方法,在这里我来给出,请不吝赐教。参考代码: int n; scanf("%d",&n); …… 题解列表 2024年08月23日 1 点赞 0 评论 200 浏览 评分:6.0
菜鸟编程,高手勿看 摘要:解题思路:利用while 循环来进行元素逆置注意事项:参考代码:#include<iostream>using namespace std;int main(){ int arr[10]; for (…… 题解列表 2024年08月23日 0 点赞 0 评论 251 浏览 评分:9.9
白细胞计数 学习新函数 摘要:解题思路:利用冒泡排序,直接从小到大排好数组顺序(或者利用algorithm库的sort函数排序)再利用cmath库求绝对值和较大的数省去重复利用if-else函数,使代码更简洁客观参考代码:int …… 题解列表 2024年08月23日 0 点赞 0 评论 241 浏览 评分:9.9
2875: 回文子串 摘要:解题思路:注意事项:参考代码:#include <stdlib.h> #include <stdio.h> #include <iostream> #include <string.h> us…… 题解列表 2024年08月23日 0 点赞 0 评论 166 浏览 评分:9.9
编写题解 2955: 判决素数个数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int c(int n){ if(n==1) return 0; for(int i…… 题解列表 2024年08月22日 0 点赞 0 评论 455 浏览 评分:0.0
动态规划通用题解,学会了就都懂了 摘要:解题思路:二维数组填表来实现注意事项:vtype代表的是价值和体重的类型如果可以,自己实现一个函数不用max函数是最优解,即可达到动态规划公式参考代码:#include <iostream>using…… 题解列表 2024年08月22日 0 点赞 0 评论 258 浏览 评分:0.0
2872: 字符环 摘要:解题思路:注意事项:参考代码:#include <stdlib.h> #include <stdio.h> #include <iostream> #include <string.h> us…… 题解列表 2024年08月22日 0 点赞 0 评论 146 浏览 评分:9.9
暴力拆解 分解质因数 直接算出最小的质因数 摘要:解题思路:某数已知是两个质数的乘积,这里设为n大质数设为b;小指数设为a根号下n一定大于较小的质数a(可数学验证),以此解决计算时间超时的问题参考代码:int n;scanf("%d",&n);int…… 题解列表 2024年08月21日 0 点赞 0 评论 303 浏览 评分:9.9