蓝桥杯2019年第十届真题-旋转-题解(C++代码) ```cpp#include#include#include#include#include#include#includeusingnamespacestd;typedeflonglongLL;constintINF=0x3f3f3f3f;constintMAXN=100+5;intr, 题解列表 2020年03月28日 0 点赞 0 评论 1230 浏览 评分:9.9
化学品问题-题解(C++代码)记忆化搜索 ```cpp#includeusingnamespacestd;intt,n,m;longlongdp[35][35][35];longlongDFS(inti,intcnt,intlx){/*cnt表示已放的位置的数量,lx表示当前已经连续放了多少个*/if(i==n+1)return1;if(dp 题解列表 2020年03月29日 0 点赞 0 评论 1376 浏览 评分:9.9
[STL训练]亲和串 (C++代码)只做最好的思路! 这题我一开始竟然理解错了,我把它理解成了集合问题难怪错误50%,代码如下:```cpp#includeusingnamespacestd;intmain(){intp;stringstr1,str2;while(cin>>str1>>str2){p=0;for(inti=0;i 题解列表 2020年03月29日 0 点赞 0 评论 1664 浏览 评分:9.9
蓝桥杯算法训练VIP-装箱问题-题解(Python代码) 类背包问题,加动态规划,剪枝优化。```pythondefmain():v,n=int(input()),int(input())cv=[0]+[int(input())for_inrange(n)]#存重量dp=[vfor_inrange(v+1)]#动态存每个体积对应最小体积foriinrange 题解列表 2020年03月29日 0 点赞 0 评论 1573 浏览 评分:9.9
半数集问题-题解(C++代码)记忆化搜索 爆搜会超时,记搜才能AC```cpp#includeusingnamespacestd;longlongdp[1005];//dp[n]表示半数集set(n)中元素个数longlongDFS(intn){if(dp[n]==-1)//当前状态没计算出来, 题解列表 2020年03月29日 0 点赞 0 评论 1126 浏览 评分:9.9
姜太公钓鱼-题解(C++代码) 摘要:```cpp #include using namespace std; int main(){ int n; cin>>n; int p[n]; in…… 题解列表 2020年03月29日 0 点赞 0 评论 957 浏览 评分:9.9
蓝桥杯算法训练VIP-薪水计算-题解(C语言代码) 摘要:```cpp #include #include using namespace std; int main(){ /**< 编写一个程序,计算员工的周薪。 …… 题解列表 2020年03月29日 0 点赞 0 评论 1548 浏览 评分:9.9
[编程入门]结构体之成绩统计2-题解(C语言代码) ```c#include#includetypedefstructstudentss;structstudent{charid[20];charname[25];intscore[3];};voidInput(intn,ss*p);voidGetAve(intn, 题解列表 2020年03月29日 0 点赞 0 评论 1887 浏览 评分:9.9
蓝桥杯2019年第十届真题-完全二叉树的权值 (C++代码) 输入的时候计算每层的和;```cpp#include#definelldlonglongintusingnamespacestd;inttree(intn){intx=1,y=0,c;//lldmax=0;while(n>0){lldsum=0;//完全二叉树最后一层可能不满, 题解列表 2020年03月30日 0 点赞 0 评论 1355 浏览 评分:9.9
取石子游戏-题解(C语言代码) #include#includeintmain(void){inta=0,b=0;while(EOF!=scanf("%d%d",&a,&b)){if(a==b)printf("1\n");else{if((a>b&&b*2==(int)(a*(sqrt(5)-1)))||(b>a&&a*2==(in 题解列表 2020年03月30日 0 点赞 0 评论 1822 浏览 评分:9.9