1030: [编程入门]二维数组的转置 解题思路:把二维数组转置,也就是把各个元素的列号和行号互换(如arr[1][2]转置后成为arr[2][1])。注意事项:这里不使用新的数组保存转置后的数组,然后再输出。但在函数中转置输出的数组并不改变原数组(因为没有用指针)。数组作为函数参数时传递数组名即可(不用写change(arr[3][3]) 题解列表 2023年02月28日 0 点赞 0 评论 529 浏览 评分:0.0
01背包+二维费用问题 ```//https://www.dotcpp.com/oj/problem3056.html#include#include#includeusingnamespacestd;constintN=1010,M=510;intn,V1,V2;intv1[N], 题解列表 2023年02月28日 0 点赞 0 评论 545 浏览 评分:0.0
辗转相除法求最大公因数 思路:最小公倍数=两个整数的乘积/最大公因数最小公倍数辗转相除代码:#includeintmain(){inta,b;inttemp,m1,m2,ab;scanf("%d%d",&a,&b);ab=a*b;if(a 题解列表 2023年02月28日 0 点赞 0 评论 540 浏览 评分:0.0
2821: 开关灯 摘要:参考代码:#include<stdio.h> #include<math.h> int main() { int n,m; scanf("%d %d",&n,&m); …… 题解列表 2023年02月28日 0 点赞 0 评论 550 浏览 评分:0.0
2825: 计算多项式的值(C) 摘要:参考代码:#include<stdio.h> #include<math.h> int main() { double x; int n; scanf("%lf…… 题解列表 2023年02月28日 0 点赞 0 评论 615 浏览 评分:0.0
2826: 雇佣兵 摘要:#include<stdio.h> #include<math.h> int main() { int m,n,x; scanf("%d %d %d",&m,&n,&x)…… 题解列表 2023年02月28日 0 点赞 0 评论 581 浏览 评分:0.0
辗转相除法求最大公约数与最小公倍数 摘要:解题思路:1.最大公约数:辗转相除 2.最小公倍数:两数乘积/最大公约数注意事项:参考代码:#include<stdio.h> int Max_GY(int x,int y); int Min_…… 题解列表 2023年02月28日 0 点赞 0 评论 462 浏览 评分:0.0
自定义函数求一元二次方程 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<math.h> int main() { //输入处理 float a,b,c,del…… 题解列表 2023年02月28日 0 点赞 0 评论 636 浏览 评分:0.0
[编程入门]自定义函数之字符提取 摘要:解题思路:注意事项:参考代码:def copy(a): lst="aeiou" for i in a: for j in lst: if i == j:…… 题解列表 2023年02月28日 0 点赞 0 评论 442 浏览 评分:0.0
python 1621字符串编辑 带解析 摘要:def de(): #删除 for i in range(len(s)): #找到要替换的 直接改为空字符 然后跳出 if E[1]==s[i]: s[i]=…… 题解列表 2023年03月01日 0 点赞 0 评论 560 浏览 评分:0.0