自定义函数之整数处理 C++题解 摘要:解题思路输入数组每个元素后,找出最大值和最小值的下标,交换第一位和最小值,最后一位和最大值C++中min_element(a+n,a+m)和max_element(a+n,a+m)可以找出数组中最小值…… 题解列表 2021年08月02日 0 点赞 0 评论 677 浏览 评分:8.0
蓝桥杯2013年第四届真题-危险系数 dfs遍历邻接表 摘要:``` #include using namespace std; const int N = 1100, M = 2 * N; int n,m; int cnt[N]; vector …… 题解列表 2021年08月02日 0 点赞 0 评论 873 浏览 评分:9.9
数据结构-静态链表(C++) 摘要:#include <iostream> #include <string> #include <iomanip> #define MAXSIZE 11 using namespace …… 题解列表 2021年08月02日 0 点赞 0 评论 484 浏览 评分:0.0
蓝桥杯2013年第四届真题-买不到的数目 摘要:``` #include using namespace std; int a,b; set s; vector c; int main() { cin>>a>>b; fo…… 题解列表 2021年08月01日 0 点赞 0 评论 469 浏览 评分:0.0
蓝桥杯历届试题-九宫重排 c++ 摘要:``` #include using namespace std; int fx[4][2] = { {0,-1},{-1,0},{0,1},{1,0} }; string start; …… 题解列表 2021年08月01日 0 点赞 0 评论 728 浏览 评分:0.0
c++,cin.get()解法 摘要:解题思路:cin.get()读到行的最后一个,但是不读入回车,因此,通过读到null终止循环。注意事项:参考代码:#include<iostream>#include<string>using nam…… 题解列表 2021年07月31日 0 点赞 0 评论 869 浏览 评分:0.0
阶乘求和,用函数解 摘要:解题思路:函数注意事项:参考代码:#include<iostream>using namespace std;long long f(int a1){ int i=2; long long s=1; …… 题解列表 2021年07月31日 0 点赞 0 评论 758 浏览 评分:0.0
Minesweeper(c++代码) 摘要:解题思路: 检测每一个字符周围八个字符是否存在地雷,考虑到字符四个角落及四条边存在限制,因此在四个角落及四条边外面在套上另外一层空字符串,使得每一个输入的字符串都存在八个领字符串。注意事项:参考…… 题解列表 2021年07月30日 0 点赞 0 评论 879 浏览 评分:9.9
蓝桥杯2013年第四届真题-打印十字图 c++ 摘要:##### 思路 : 只做出图形的1/4然后进行变形就能得到最后的图形 ##### 分类讨论: ##### 1.当j == 1时 ##### 2.当j == 2时 ##### 3.当j为奇数且…… 题解列表 2021年07月30日 0 点赞 0 评论 773 浏览 评分:9.9