题解列表

筛选

理财计划(c++)

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>using namespace std;int main(){ double k=0,n=0,p=0……

淘淘的名单(C++)

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;int main(){ int n=0; string a[1……

2750: 字符菱形

摘要:解题思路:   直接输出注意事项:参考代码:                #include<iostream>using namespace std;int main(){    char c;  ……

回文串-字符串处理(C++)

摘要:参考代码:#include<cstdio>#include<cstring>const int maxn = 256;   //判断字符串str是否是“回文串”bool judge(char str[……

详解,注释多,易理解

摘要:要注意转换的顺序,比如数据10 2 3 4 5 6 7 8 1 9,如果直接找到最大值最小值所在位置的下标,再互换会出错,所以我选择分先后转换,先转换最小值和第一个数字,再转换最大值和最后一个数字 ……

1726: 字符串的反码

摘要:解题思路:根据题意可得,b的反码是x 即b-a==z-x x==z+a-b 即s[i]的反码为z+a-s[i]注意测试数据内有空格,代码需要可以接收空格参考代码:#include <iostream>……

1273: ISBN码(简介代码)

摘要:解题思路:先解释一下题目,要求检查识别码是否正确,识别码是最后一位的数字0-670-82162-4,这里最后一位的4就是识别码。4=(0×1+6×2+……+2×9)%11;注意如果最后得10,识别码为……

排序(超简单的sort排序)

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int arr[200000]={0};int main(){  int n; wh……