题解列表

筛选

辗转相除法

摘要:```cpp #include using namespace std; int gcd(int a, int b){ return b ? gcd(b, a % b) : a; ……

尝除法求约数

摘要:```cpp #include using namespace std; void check(int n){ vectora; for(int i = 1; i n; c……

没毛病吧?、老铁

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() {     cout<<4150<<endl; cout……

蓝桥杯算法提高VIP-分分钟的碎碎念

摘要:解题思路:读懂题目很重要,题目的意思是form[i]中保存的是念头的来源,假如form[i]中的是5,那么他的念头就进入form[5],form[5],保存的是0,那因果链就断了,因为0是没有来源的注……

模拟吧!!!

摘要:```cpp #include using namespace std; bool check_zhi(int n){ if(n < 2)return false; fo……

dfs搜索!!!

摘要:```cpp #include using namespace std; const int L = 12; int n; char arr[L][L]; bool lie[L],……

1924: 蓝桥杯算法提高VIP-01背包

摘要:解题思路:非常经典的dp题目注意事项:必须把横向第一行和纵向第一行归零参考代码:#include<bits/stdc++.h> using namespace std; int main() {……

1055: 二级C语言-进制转换

摘要:解题思路:十进制转n进制的计算方法:每次除n取余,一直除到0为止,余数从后往前排列就是n进制的表示。注意事项:memset()的头文件,每次都要吃一个编译错误才想起来加。参考代码:// 题目 1055……