while语句解法 摘要:解题思路: 倒推注意事项:第N天相当于它只吃了N-1次,∴while后的条件为N >1参考代码:n = eval(input())x = 1while n>1: x = (x+1)*2 n…… 题解列表 2022年03月22日 0 点赞 0 评论 694 浏览 评分:0.0
蓝桥杯算法提高VIP-和最大子序列python解法 n=int(input())li=list(map(int,input().split()))max_val=0#max_val表示子序列和的最大值b=0#b用来记录当前子序列和的值flag=0#标志上一个元素是否大于0foriinrange(len(li)):ifli[i]>0andflag==1: 题解列表 2022年03月22日 0 点赞 1 评论 454 浏览 评分:0.0
混子(为什么才25%??dp有的都30+) 摘要:#include #include using namespace std; string a; char b[27]; int main(){ cin>>a; for(int i…… 题解列表 2022年03月22日 0 点赞 0 评论 670 浏览 评分:0.0
顺序栈---基本方法 摘要:#include<stdio.h> #include<stdlib.h>#include<malloc.h>#define maxsize 50using namespace std;typedef …… 题解列表 2022年03月22日 0 点赞 0 评论 661 浏览 评分:0.0
1045: [编程入门]自定义函数之整数处理 c++ 解题思路:思路普通,直白,易理解,新手做法。(1)构建两个数组,赋相同值。(2)通过双循环,b数组中的数依次与a数组的每一个数比较大小,通过sum记录值,达到9时,b[j]就是最值。交换b[j]与b[0]或b[9],此时用到temp临时存储值。 题解列表 2022年03月22日 0 点赞 0 评论 727 浏览 评分:0.0
字符串数组做法 摘要:#include<stdio.h>#include<string.h>int main(){ char a[1000]; char b[1000]; char c[1000]; …… 题解列表 2022年03月22日 0 点赞 0 评论 600 浏览 评分:0.0
1510: 蓝桥杯算法提高VIP-士兵排队问题(狗币java + 拓扑) 摘要:[https://www.dotcpp.com/oj/problem1510.html](https://www.dotcpp.com/oj/problem1510.html) - 思路&注意事…… 题解列表 2022年03月22日 0 点赞 0 评论 878 浏览 评分:0.0
1620: 蓝桥杯算法训练VIP-字符串的展开 step1:先找出有几个'-'strp2:设置初始指针sta=0,while循环一个一个'-'判断,每次循环从sta开始遍历,若找到'-'(只要找到一次'-',处理完后面的步骤就推出循环),更新sta为'-'后面一格,在进行后面的操作进一步更新stastep3:下一次循环中从新的sta开始遍历, 题解列表 2022年03月22日 0 点赞 0 评论 747 浏览 评分:0.0
用vector巧解高精度问题 摘要:解题思路:注意事项:参考代码:#include<iostream>#include <vector> using namespace std;vector<int> add(vector <int> …… 题解列表 2022年03月22日 0 点赞 0 评论 617 浏览 评分:0.0
暴力做法!!! ```cpp#includeusingnamespacestd;intn,m,ans=0;constintN=40;//行号和列号都是偶数不能步入当前这一格//只能向右或者向下boolcheck(intx,inty){if(x%2==0&&y%2==0)returnfalse;returntrue;} 题解列表 2022年03月22日 0 点赞 0 评论 665 浏览 评分:0.0