题目 1434: 蓝桥杯历届试题-回文数字 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std; int a[7]; int n,n1; int main(){ …… 题解列表 2021年04月11日 0 点赞 0 评论 444 浏览 评分:9.9
带参宏定义 摘要:解题思路:宏定义的本质是替换过程注意事项:未知变量在主函数中定义参考代码:#include<iostream>using namespace std;#define swap(x,y) {t=x,x=…… 题解列表 2021年04月11日 0 点赞 0 评论 493 浏览 评分:0.0
1039: [编程入门]宏定义之闰年判断 摘要:#include<iostream>using namespace std;bool isleap(int n){ if((n % 4 == 0 && n % 100 != 0) || n % 400…… 题解列表 2021年04月10日 0 点赞 0 评论 537 浏览 评分:0.0
1038: [编程入门]宏定义练习之三角形面积 摘要:解题思路:用bool函数注意事项:一定要写 double area = sqrt(s * (s - a) * (s - b) * (s - c));不然就是求半周长了参考代码:#include<bi…… 题解列表 2021年04月10日 0 点赞 0 评论 505 浏览 评分:0.0
日期的计算 摘要:解题思路:利用类进行处理;注意事项:平年、闰年的判断。参考代码:#include<iostream> class Time { private:int year, month, day; p…… 题解列表 2021年04月10日 0 点赞 0 评论 372 浏览 评分:0.0
优质题解 题目 1433: 蓝桥杯2013年第四届真题-危险系数 摘要:解题思路:采用邻接矩阵进行深度优先搜索,我们可以这样想,每搜出一条路,ant++(记录总共搜出所少条路),且让b[搜过的路径下标]+1,这样,如果它是关键点,那么所有的深搜路径都会经过那个点,这时,b…… 题解列表 2021年04月10日 0 点赞 2 评论 1331 浏览 评分:8.5
题解 2083: 蓝桥杯基础练习-十进制转十六进制 摘要:解题思路:不停的对16取余,将取余的余数存入数组,输出的时候当余数大于9的时候加上55,强制转换为字符型注意事项:需要特判输入数字为0的时候参考代码:#include <iostream> usin…… 题解列表 2021年04月10日 0 点赞 0 评论 915 浏览 评分:9.9
日志统计(桶思想) 摘要:解题思路:桶储存,内部部依次比较,达到了K退出当前循环,这样做可以大大提高效率参考代码:#include <iostream> using namespace std; #include <vec…… 题解列表 2021年04月10日 0 点赞 0 评论 540 浏览 评分:9.9
题解 2366: 信息学奥赛一本通T1456-图书管理 摘要:解题思路:主要要用hash表,把单个字符映射一个数字的方式,比如说字符串abAB01就可以映射为{97,98,65,66,48,49}。希望把这串序列成0,mod-1中的一个数字称为字符串的hash值…… 题解列表 2021年04月10日 0 点赞 0 评论 1371 浏览 评分:8.6
蓝桥杯算法提高VIP-夺宝奇兵 DP 摘要:#include<iostream> using namespace std; const int maxn = 150; int map[maxn][maxn]; int dp[maxn][…… 题解列表 2021年04月10日 0 点赞 0 评论 467 浏览 评分:0.0