1045: [编程入门]自定义函数之整数处理(注意特殊情况,尤其容易错!) 摘要:本题的易错点在于,当你把最大值放在首位的时候,先换了最小值,最大值不在原来的位置了,后换最大值的时候就出错了;最小值同理; ```c #include int zchuli(int a[])…… 题解列表 2022年05月19日 0 点赞 0 评论 431 浏览 评分:0.0
蓝桥杯2021年第十二届国赛真题-二进制问题 -- 数位dp 摘要:```cpp #include #include using namespace std; const int N = 100; long long f[N][N]; long l…… 题解列表 2022年05月19日 0 点赞 0 评论 789 浏览 评分:0.0
求对角线之和 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#define N 100int main(){ int n,sum=0; cin >> n;…… 题解列表 2022年05月19日 0 点赞 0 评论 404 浏览 评分:0.0
用内置函数解决问题 摘要:解题思路:将每个人学生的总成绩和学号用zip函数打包,可以实现学号和成绩的动态排序。用sort函数以及reverse函数先按总分大小进行排序,再来考虑总分相同的情况。注意事项:参考代码: n=int(…… 题解列表 2022年05月19日 0 点赞 0 评论 454 浏览 评分:0.0
题解 1095: The 3n + 1 problem 关于超时 摘要:注意事项:关于超时,while(a!=1)我写成while(a>=1)就超时了,不太明白参考代码:#include<iostream> #include<string> using namespa…… 题解列表 2022年05月20日 0 点赞 0 评论 317 浏览 评分:0.0
[编程入门]数字的处理与判断-两个for循环 摘要:解题思路:构造一个求位数的函数,得到位数,利用求余,除法求出倒数等注意事项:参考代码:#include<iostream>using namespace std;#include <iomanip>i…… 题解列表 2022年05月20日 0 点赞 0 评论 377 浏览 评分:0.0
[编程入门]阶乘求和——循环次数最少 摘要:解题思路:另取一数值计算i的阶乘 每次相加注意事项:可能超出范围 要用longlong参考代码:#include<iostream>using namespace std;int main(){ …… 题解列表 2022年05月20日 0 点赞 0 评论 336 浏览 评分:0.0
编写题解 1584: 蓝桥杯算法训练VIP-判定字符位置 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h> using namespace std; int main() { string st…… 题解列表 2022年05月20日 0 点赞 0 评论 360 浏览 评分:0.0
编写题解 1584: 蓝桥杯算法训练VIP-判定字符位置(2) 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() { string str1="aeiou"; …… 题解列表 2022年05月20日 0 点赞 0 评论 368 浏览 评分:0.0
蓝桥杯算法提高VIP-前10名 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;int main(){ int n; int a[21…… 题解列表 2022年05月20日 0 点赞 0 评论 368 浏览 评分:0.0