题解列表
C++实现小数点控制
摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>using namespace std;int main(){ int a; doubl……
编写题解 1504: 蓝桥杯算法提高VIP-勾股数
摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ for(int a=1;a<=1000;a++) { ……
编写题解 1468: 蓝桥杯基础练习VIP-报时助手
摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n,m; cin>>n>>m; string……
1220题解 C++ 序列有序 新思路
摘要:解题思路:
1.把数直接插入原序列的末尾
2.然后用sort函数对新序列进行排序后再输出
注意事项:
利用sort函数要加algorithm的头文件
参考代码:
```cpp
#incl……
二级c语言--求素数-c++
摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std; int isprime(int n){ int c=0; if(n==1)return ……
优质题解
1093: 字符逆序
摘要:解题思路:(1)利用反向迭代器reverse_iterator:rbegin() 和 rend(),比如:string str1("1234567890");
string str2(str1.rb……
优质题解
1097: 蛇行矩阵
摘要:解题思路:(1)建一个大小为 N 的二维数组。(2)定义一个计数器,每生成一节蛇就+1。(3)生成蛇的顺序是斜着、从行开始,比如蛇的第二条斜线,就是在 (1, 0) 和 (0, 1) 的位置按顺序生成……