1952: 求长方形面积 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<iomanip> using namespace std; int main() { int n…… 题解列表 2023年10月15日 0 点赞 0 评论 342 浏览 评分:0.0
1953: 三位数分解 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<iomanip> using namespace std; int main() { int n…… 题解列表 2023年10月15日 0 点赞 0 评论 243 浏览 评分:0.0
1954: 话费计算 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<iomanip> using namespace std; int main() { int n…… 题解列表 2023年10月15日 0 点赞 0 评论 298 浏览 评分:0.0
1169: 绝对值排序 摘要:解题思路:一个数若为负数,则这个数的绝对值等于它的相反数;若为非负数,则为它本身; 我们可以定义两个数组sum和sum2,sum用来存放原数,sum2存放绝对值; …… 题解列表 2023年10月14日 0 点赞 0 评论 283 浏览 评分:9.9
用动态规划求解爬楼梯 摘要:解题思路:#include<iostream>using namespace std;int dp[30];//dp数组表示到i阶梯的总的方案数//则第i个可能有i-1上来,或者i-3上来 int m…… 题解列表 2023年10月14日 0 点赞 0 评论 335 浏览 评分:0.0
spfa算法,采用队列, 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>#include<queue>#include<algorithm>using namespace …… 题解列表 2023年10月14日 0 点赞 0 评论 320 浏览 评分:9.9
题解 2974: 统计字符数 摘要:解题思路:首先,观察题目,就本题分成几个任务:第一个任务:输入字符串。我们可以发现,本题中输入的变量(字符)的数量是不固定的,用普通的循环无法完成,就需要一种特殊的方法。while(cin>>c)//…… 题解列表 2023年10月14日 0 点赞 0 评论 461 浏览 评分:0.0
2974: 统计字符数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int tong[200];int main(){//输入随机个数字 cha…… 题解列表 2023年10月14日 0 点赞 0 评论 391 浏览 评分:0.0
题解 2846: 统计数字字符个数 摘要:参考代码:#include <bits/stdc++.h> using namespace std; int tong[150]; int main() { int sum=0; …… 题解列表 2023年10月14日 0 点赞 0 评论 340 浏览 评分:9.9
2909: 直方图 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;long long tong[10000];int main(){ int …… 题解列表 2023年10月14日 0 点赞 0 评论 262 浏览 评分:0.0