题解列表

筛选

蓝桥杯算法提高VIP-快速幂

摘要:**解题思路:** **快速幂** ```cpp 快速幂乘法,将指数看成由0和1构成的二进制数,按位进行运算,对于大数还要“步步取模” #include #include usin……

蓝桥杯历届试题-回文数字

摘要:解题思路:注意事项:参考代码: #include"bits/stdc++.h" using namespace std; int main(){  int n;  int flag=0; ……

hhhhhhhhhhhhhhhh谢谢你

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

dfs 1117: K-进制数

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int ans; int n, k; void dfs(int x, int cn……

1989: 奇数个数

摘要:用字符串保存起来遍历。#include <bits/stdc++.h> using namespace std; int main(){     string s;     cin >> ……

2003: 统计字符个数

摘要:看清楚题目是输入十个字符!!!这里被坑了一手。#include <bits/stdc++.h> using namespace std; int main(){     char s[11]……

1978: 分类计算

摘要:无脑打印。#include <bits/stdc++.h> using namespace std; int main(){     int a,b;     cin >> a >> b;……

1598: 蓝桥杯算法训练VIP-学生成绩

摘要:学 Java 去了好久没刷了,来一题练练手感。直接用 STL 自带的稳定排序函数,切记不能用 sort(),需要用 stable_sort()。#include <bits/stdc++.h> us……