【鼠鼠】用两层循环ac一道中等题 摘要:1.核心思路贪心,最少步数的办法是找到相同的字符,通过删除和修改达到一致 2.比如sfdxbqw 和 gfdgw,只要把一样的留下,不一样的在第二字符串个长度之前就改,在第二个字符串之后出现的不…… 题解列表 2022年04月01日 0 点赞 0 评论 443 浏览 评分:0.0
题解 1218: 排列之STL大法 摘要:用数组b记录数组a的下标然后使用next_permutation()函数得到数组a的元素顺序的全排列参考资料:https://blog.csdn.net/qian2213762498/article/…… 题解列表 2022年04月01日 0 点赞 0 评论 554 浏览 评分:9.9
最大公约数与最小公倍数模板 摘要:#include <stdio.h> int gcd(int a,int b) { if(b==0)return a; else return gcd(b,a%b); } int ma…… 题解列表 2022年04月01日 0 点赞 0 评论 345 浏览 评分:9.9
【鼠鼠】用getline和getchar两个函数ac一道简单题 摘要:1.首先阅读题目仔细点,输出是要空两行的 2.getline(cin,string)真的太好用辣,碰到换行和EOF才停的 3.getchar()用来作为输入空格的接收函数 ```…… 题解列表 2022年04月01日 0 点赞 0 评论 444 浏览 评分:0.0
有手就行之数组插入 摘要:解题思路:用手注意事项:参考代码:#include<stdio.h>int main(){ int a[10],i,j,m; for(i=0;i<9;i++) { scanf("%d",…… 题解列表 2022年04月01日 0 点赞 0 评论 405 浏览 评分:9.9
二级C语言-公约公倍 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int gcd(int x,int y){ int t; t = x%y…… 题解列表 2022年04月01日 0 点赞 0 评论 391 浏览 评分:0.0
不用数组版C语言-计负均正 摘要:解题思路:输一个判断一个注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n=0,m; double…… 题解列表 2022年04月01日 0 点赞 0 评论 461 浏览 评分:7.0
计负均正c++(新手勿喷) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int num[100]; int count …… 题解列表 2022年04月01日 0 点赞 0 评论 366 浏览 评分:9.9
: 二级C语言-等差数列 摘要:解题思路:注意事项:注意此题为求解前n项和参考代码:#include<stdio.h>int main(){ int n; int sum=0; scanf("%d",&n); i…… 题解列表 2022年04月01日 0 点赞 0 评论 311 浏览 评分:9.9
C语言训练-邮票组合问题*(python版) 摘要:解题思路:注意事项:参考代码:a = [0,3,6,9,12]#将4张3分的所有情况列出b = [0,5,10,15]#将3张5分的所有情况列出c = []s = 0for i in range(0,…… 题解列表 2022年04月01日 0 点赞 0 评论 388 浏览 评分:0.0