c++解决买瓜问题,回溯算法 摘要:解题思路:将瓜从大到小排序,以获得最小切割次数,采用回溯算法来判断切割次数注意事项:由于采用float定义会产生精度误差,所以采用*2的方式参考代码:#include#include#includeu…… 题解列表 2024年04月01日 0 点赞 0 评论 949 浏览 评分:9.9
题解 1013: [编程入门]Sn的公式求和 摘要:解题思路:观察Sn的单项:2,2+20,2+20+200,……。每项比前一项要高2*10^(k-1)(k为Sn的项数),因而可写出Sn单项的for循环,得出各个单项的值。再构建一个for循环,用于将每…… 题解列表 2024年04月01日 0 点赞 0 评论 301 浏览 评分:9.9
2831: 画矩形 python (简单易懂) 摘要:解题思路:注意事项:参考代码:h,w,s,f=map(str,input().split())h=int(h)w=int(w)for i in range(1,h+1): if f == …… 题解列表 2024年04月02日 0 点赞 0 评论 382 浏览 评分:9.9
超简单,一看就懂的题解!!! 摘要:解题思路:看代码注释注意事项:注意,刚开始没有意识到,最后一次是没有弹起来的,所以最后一次是加零。参考代码:#include<bits/stdc++.h> using namespace std; …… 题解列表 2024年04月02日 0 点赞 0 评论 431 浏览 评分:9.9
要注意测试案例会包括空格 摘要:解题思路:注意事项:要用gets函数,测试数据里面有空格,%s接受不了参考代码:#include<stdio.h>#include<string.h>int main(){ char a[100]; …… 题解列表 2024年04月02日 1 点赞 0 评论 547 浏览 评分:9.9
c++十六进制转八进制 摘要:#include<bits/stdc++.h>using namespace std;const int N=100000;using ll=long long;char ch[]={'0&#…… 题解列表 2024年04月02日 0 点赞 0 评论 410 浏览 评分:9.9
回文串(简单易懂c语言) 摘要:解题思路:先把a数组倒叙赋值给b数组,接着比较a,b数组是否相等注意事项:参考代码: #include <stdio.h> 题解列表 2024年04月02日 1 点赞 0 评论 536 浏览 评分:9.9
蓝桥杯2023年第十四届省赛真题-接龙数列 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <string>using namespace std;int dp[10];int main(){ int n…… 题解列表 2024年04月02日 2 点赞 1 评论 1292 浏览 评分:9.9
字典解决法,简单 摘要:解题思路:用排除法来判断是否有解法,踢去不可能的,则是存在的注意事项:参考代码:s1 = input().strip() s2 = input().strip() s3 = input().str…… 题解列表 2024年04月02日 0 点赞 0 评论 359 浏览 评分:9.9
蓝桥杯2023年第十四届省赛真题-子串简写 摘要:解题思路:注意事项:参考代码:常人思路(超时)#include <bits/stdc++.h> using namespace std;int K;long long ans=0;string S;c…… 题解列表 2024年04月02日 2 点赞 0 评论 1099 浏览 评分:9.9