亲和串,简洁扼要,正解。(加入了循环队列思想哦) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<set>#include<cstdio>#include<algorithm>using namespace std…… 题解列表 2023年05月17日 0 点赞 0 评论 494 浏览 评分:9.9
枚举法 列出所有的可能 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b,c,d,e,f; for(a=0…… 题解列表 2023年05月17日 0 点赞 0 评论 429 浏览 评分:0.0
不重复的输出数(新手题解) 摘要:解题思路:记录数组中的最大值,记录每个数字的出现次数,输出时从1到最大值遍历,次数大于0则输出注意事项:参考代码:#include<stdio.h>int c[99999]={0},d[99999];…… 题解列表 2023年05月17日 0 点赞 0 评论 506 浏览 评分:0.0
利用指针修改相应的地址实现字符逆序 摘要:#include <stdio.h>#include <string.h>void interchange(char *i,char *j);int main(){ char str[100];…… 题解列表 2023年05月17日 0 点赞 0 评论 430 浏览 评分:0.0
题目 1172: 计算两点间的距离解答 摘要:解题思路:(x1-x2)^2+(y1-y2)^2=d^2注意事项:参考代码:#include<iostream>#include<cstdio>#include<cmath>using namespa…… 题解列表 2023年05月17日 0 点赞 0 评论 412 浏览 评分:0.0
题目 1171: 蟠桃记解答 摘要:解题思路:a[n]=2*(a[n]+1)注意事项:别忘了if(n==1) result=1;这两行!参考代码:#includeusing namespace std; int f(int n){ …… 题解列表 2023年05月17日 0 点赞 0 评论 417 浏览 评分:0.0
数字处理与判断1099 摘要:解题思路:将输入的整数变为字符串,用<string.h>里的strlen()计算该字符串的位数; 2.用for循环输出单个字符;注意事项:for循环中的循环次数=strle…… 题解列表 2023年05月16日 0 点赞 0 评论 338 浏览 评分:0.0
一个刚刚开始刷题的菜鸟!! 摘要:解题思路:仔细观察,将这个数列构造出来就行了;注意事项:参考代码:#include<iostream> using namespace std;int main(){ int n,sum=0; int…… 题解列表 2023年05月16日 0 点赞 0 评论 499 浏览 评分:9.9
1072:汽水瓶 Java题解 摘要:思路:该解决方案使用了循环迭代的方法来计算最多可以喝的汽水瓶数。我们不断将空汽水瓶按照规定的换瓶规则进行兑换,每次兑换后计算新的空瓶数,直到剩余的空瓶数不足以再进行一次兑换。具体的做法是,将空瓶数n除…… 题解列表 2023年05月16日 0 点赞 0 评论 540 浏览 评分:9.9
简单求三个数最大值 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int max(int a,int b){ //判断大小 return a>b?a:b; //使用条件运算符:如果a>b…… 题解列表 2023年05月16日 0 点赞 0 评论 389 浏览 评分:0.0