1000: [竞赛入门]简单的a+b 摘要:参考代码:#include<iostream>using namespace std;int main(){ int a,b; while(cin>>a>>b)cout<<(a+b)<<e…… 题解列表 2023年02月09日 0 点赞 0 评论 560 浏览 评分:9.9
津津的储蓄计划(简单明了) 摘要:解题思路:输出格式用%d时,不能用(存钱总数*1.2+12月份直接表示,因为它是实数型),要转换类型,才能得到正确结果。注意事项:参考代码:#include<stdio.h>int main(){ …… 题解列表 2023年02月09日 0 点赞 0 评论 1208 浏览 评分:9.9
短信计费C语言解答 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n; scanf("%d",&n); int a[n]; int i; for(i=0;i<n;i++)…… 题解列表 2023年02月09日 0 点赞 0 评论 997 浏览 评分:9.9
2127: 信息学奥赛一本通T1258- 数字金字塔 摘要:解题思路:动态规划逆推法。注意事项:注意是从n-1行开始推参考代码:#include<bits/stdc++.h> using namespace std; int n,a[1005][1005]…… 题解列表 2023年02月09日 0 点赞 0 评论 818 浏览 评分:9.9
最长上升子序列问题2 #最长上升子序列问题##注意事项1.从题目中可以看出,一开始上升后面下降,即先求上升子序列再求下降子序列。2.如果用三重循环可能超时,可以先预处理出左右循环,这样就是两重循环。####代码```#include#includeusingnamespacestd;constintN=1010;intn; 题解列表 2023年02月09日 0 点赞 0 评论 660 浏览 评分:9.9
最长上升子序列问题3-友好城市 ##最长上升子序列问题3###注意事项1.通过分析可以发现,符合标准的序列首先应该满足上下城市的编号都是递增的。2.那么先对一边的坐标进行排序,再对另一边进行最长上升子序列问题的求解即可。3.可以使用结构体或pair存储。4.其他类似问题有《登山》《怪盗基德的滑翔翼》《合唱队形》#####代码```/ 题解列表 2023年02月09日 1 点赞 0 评论 656 浏览 评分:9.9
最大上升子序列和-DP ####DP问题####注意事项-与最长上升子序列问题思路相同,仅仅改变维护的信息。######代码```#include#includeusingnamespacestd;constintN=1010;intn;inta[N],f[N];intmain(){cin>>n;for(inti=1;i 题解列表 2023年02月09日 0 点赞 0 评论 733 浏览 评分:9.9
K-进制数题解 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int zuhe(int n,int m){ int z=1; for(int i=…… 题解列表 2023年02月09日 0 点赞 0 评论 498 浏览 评分:9.9
1002: [编程入门]三个数最大值c++代码 摘要:解题思路:先重大到小排序,再输出最大值。注意事项:要输最大值。参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a[…… 题解列表 2023年02月09日 0 点赞 0 评论 568 浏览 评分:9.9
自定义函数之数字分离(这样也行) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char arr[5]; gets(arr); int n = strlen…… 题解列表 2023年02月09日 0 点赞 0 评论 524 浏览 评分:9.9