最长不下降子序列的长度(Java)看没人发Java的发一个 摘要: Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int m[] = new int[n];//…… 题解列表 2023年03月22日 0 点赞 0 评论 427 浏览 评分:9.9
递归遍历解空间+优化剪枝 摘要:解题思路:01背包问题也就是每样物品有放和不放两种选择的问题。题目要解决的问题是如何组合放入背包的物品来达到价值最大化。假设共有3件物品,分别选择放、放,不放。那么解可以抽象为(110);当然,只有3…… 题解列表 2023年03月22日 0 点赞 0 评论 361 浏览 评分:9.9
c语言 最简单 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ long long int N; scanf_s("%lld", &N); lo…… 题解列表 2023年03月22日 0 点赞 0 评论 294 浏览 评分:9.9
技能升级——Java 摘要:# 前言 一开始我想到的是每次输入power和lose之后,我直接算出每个技能会被分成的各个部分,并存入arraylist中,之后排序arraylist,取前面的Math.min(m,array…… 题解列表 2023年03月22日 0 点赞 0 评论 844 浏览 评分:9.9
1402: 简单的字符串 摘要:```cpp #include using namespace std; int main() { int n; cin>>n; while(n--) …… 题解列表 2023年03月22日 0 点赞 0 评论 764 浏览 评分:9.9
我不李姐为什要用k* 摘要:解题思路:模仿c++的思路写的,但还是没能很理解,不看题解自己想不出来也写不出来注意事项:参考代码:def s(n,k): if n<k or k==0:#无标记的这个没有也没想到 …… 题解列表 2023年03月22日 0 点赞 0 评论 667 浏览 评分:9.9
蓝桥杯2018年第九届真题-全球变暖(BFS) 摘要:####解题思路 BFS每次遍历一座小岛,统计小岛的陆地数量(tot),以及被水淹没的陆地数量(bou),判断小岛陆地数量与被水淹没的陆地数量是否相等(tot == bou),若是相等则小岛被淹没。…… 题解列表 2023年03月22日 0 点赞 0 评论 659 浏览 评分:9.9
3002: 买图书(不用再抱怨有个测试点出错了,真正的测试点回来了——最新代码) 摘要:```cpp #include #include using namespace std; double n,m; int main() { cin>>n>>m; cout…… 题解列表 2023年03月22日 0 点赞 0 评论 630 浏览 评分:9.9
2000: 偶数列举 摘要:```cpp #include using namespace std; int main() { int n; cin>>n; for(int i=2;i…… 题解列表 2023年03月22日 0 点赞 0 评论 479 浏览 评分:9.9
用栈实现八进制转换 摘要:```c #include #include typedef struct Stack { int data[100]; int top; }*Stack,stack; //入栈 …… 题解列表 2023年03月22日 0 点赞 0 评论 662 浏览 评分:9.9