蓝桥杯算法提高- c++_ch03_02-题解(C++代码) 摘要:```c++ #include using namespace std; int combine(int n,int k)//组合数公式 { int rst = 1; if(k < …… 题解列表 2020年12月10日 0 点赞 0 评论 887 浏览 评分:0.0
排序-题解(C++代码) 摘要:解题思路:可以使用priority_queue优先队列自动排序十分方便并且时间短注意事项:参考代码:#include<iostream>#include<queue>using namespace s…… 题解列表 2020年12月10日 0 点赞 0 评论 1783 浏览 评分:9.9
The 3n + 1 problem -题解(C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>//本体需要注意的是输入i,j的值需要比较大小//temp在后边的运算中会产生很大的数据故int…… 题解列表 2020年12月09日 0 点赞 1 评论 979 浏览 评分:9.9
成绩等级转换-题解(C++代码)满分题解(真的) 摘要:解题思路:我用最笨的方法我用if来一个加一个的算。(最后一个用else)注意事项:参考代码:#include<iostream>using namespace std;int main(){ int …… 题解列表 2020年12月09日 0 点赞 0 评论 975 浏览 评分:9.9
蓝桥杯2013年第四届真题-大臣的旅费-题解(C++代码) ####这一题真是搞人心态,用邻接矩阵居然爆栈####那就原始邻接表和vector邻接表;```javascript#includeusingnamespacestd;#defineN100000typedefstructst{intv;//结点编号intw;//权值structst*nx;//结点指 题解列表 2020年12月07日 0 点赞 0 评论 907 浏览 评分:6.0
误落迷宫2-题解(C++代码) ```cpp#includeusingnamespacestd;#definexfirst#defineysecondtypedefpairPII;chara[100][100];intm;intn;intNext[4][2]={{0,1}, 题解列表 2020年12月07日 0 点赞 0 评论 852 浏览 评分:9.9
蓝桥杯2014年第五届真题-地宫取宝-题解(C++代码) ```cpp```cpp#includeusingnamespacestd;constintmaxn=55;#defineMod1000000007inta[110][110],n,m,k;intdp[maxn][maxn][maxn][maxn];//总方案数intdx[]={0, 题解列表 2020年12月07日 0 点赞 0 评论 713 浏览 评分:0.0
迷宫问题-题解(C++代码) ```cpp#includeusingnamespacestd;typedefpairPII;#definexfirst#defineysecondintstarx,stary,endx,endy;chara[110][110];intb[110][110];intm, 题解列表 2020年12月06日 0 点赞 0 评论 1004 浏览 评分:0.0
迷宫问题-题解(C++代码) ```cpp#includeusingnamespacestd;typedefpairPII;#definexfirst#defineysecondchara[110][110];intb[110][110];intm,n;intc[4][2]={{0, 题解列表 2020年12月06日 0 点赞 0 评论 814 浏览 评分:0.0
优质题解 ✔✔✔Vector19行暴力解法[C++] 1.将所有珠子的能量存储到一个Vector里2.遍历所有珠子找到能量最小的那个珠子的下标:k3.聚合并算出此次能量:(k号珠子能量)\*(k-1号珠子能量)*(k+1号珠子能量)4.累加步骤3得出的能量并移除第k号珠子5.重复2~4步骤直至只剩一颗珠子```cpp#include#include#in 题解列表 2020年12月06日 1 点赞 6 评论 2277 浏览 评分:6.9