[编程入门]自定义函数处理最大公约数与最小公倍数-题解(C++代码) 摘要:```cpp #include using namespace std; int max(int m,int n){ int t; int l; if(m>n){ t=m;…… 题解列表 2020年05月20日 0 点赞 0 评论 1040 浏览 评分:0.0
字符逆序-题解(C++代码) ##algorithm的reverse函数#示例代码```#include#includeusingnamespacestd;intmain(){strings;getline(cin,s);reverse(s.begin(),s.end());cout 题解列表 2020年05月19日 0 点赞 0 评论 890 浏览 评分:0.0
Hello, world!-题解(C++代码) ###这道题核心就是int和char的变换一个int数变成char语法是(char)int#示例代码```#includeusingnamespacestd;intmain(){intc;while(cin>>c)cout 题解列表 2020年05月19日 0 点赞 0 评论 975 浏览 评分:0.0
[出圈]-题解(C++代码) 摘要:```cpp #include using namespace std; int main() { int n=0, m=0; while (scanf("%d%d",&…… 题解列表 2020年05月18日 0 点赞 0 评论 1055 浏览 评分:9.9
字符串问题-题解(C++代码) reverse -- 又一个实用小技巧 题目描述字符串处理在计算机中有很多复杂的操作,但是这些复杂的操作都是由基本的字符串操作复合而成,要求编写一字符串颠倒的程序,把字符串中的字符颠倒位置。------------输入输入一字符串(>s;reverse(s.begin(),s.end());//这个函数没有返回值不能直接输出cout 题解列表 2020年05月18日 0 点赞 0 评论 1673 浏览 评分:9.9
永远的丰碑-题解(C++代码)不需要数组 摘要:#include using namespace std; int main() { int n; while(cin>>n) { int x; …… 题解列表 2020年05月17日 0 点赞 0 评论 1241 浏览 评分:0.0
多输入输出练习1-题解(C++代码) 你以为很难?? 其实简单到连数组都不用!! 题目描述给定很多行数据,要求输出每一行的最大值.------------输入程序有多行输入,每一行以0结束.------------输出有多行输出,对应输入的行数.------------样例输入23-45633780432398766-13732405442779102234-44-7327230- 题解列表 2020年05月17日 0 点赞 1 评论 1907 浏览 评分:9.9
蓝桥杯算法训练VIP-拦截导弹-题解(C++代码)最长不上升子序列和最长不下降子序列 ###用动态规划求最长不上升子序列和最长不下降子序列```cpp#includeusingnamespacestd;inth[100005];intdp[100005];intidx=0,t;intans=0,res=0;intmain(){while(scanf("%d", 题解列表 2020年05月17日 0 点赞 0 评论 1771 浏览 评分:8.0
发工资咯-题解(C++代码)感觉会做 动手有问题的可以参考一下 两种做法 思路简单!! 摘要:做法一: #include using namespace std; int main() { int n,a[1001]; while(cin>>n&…… 题解列表 2020年05月17日 0 点赞 2 评论 1364 浏览 评分:9.9
数据结构-最小生成树-题解(C++代码)prim ###prim算法,```cpp#includeusingnamespacestd;constintMAX=55;constintDMAX=0x3f3f3f3f;intn;inta[MAX][MAX];intd[MAX];boolvis[MAX];intans=0;voidprim(){d[1]=0; 题解列表 2020年05月17日 0 点赞 0 评论 1297 浏览 评分:9.9