少物品背包DFS也很快_2038: 简化型背包 摘要:一看是背包就想用dp动态规划来做,但是因为他是重量跟空间都要考虑我只能开二维数组,而且题目写着空间跟重量<=10000,开个二维的直接200多M的内存过不了;但是仔细一看他只有5个物品要放入背包,那用…… 题解列表 2022年03月10日 0 点赞 0 评论 462 浏览 评分:9.9
编写题解 1575: 蓝桥杯算法提高VIP-递归倒置字符数组 摘要:解题思路:注意事项:参考代码://// Created by ch'li'sen on 2022/3/8.//#include<iostream>using namespace std…… 题解列表 2022年03月10日 0 点赞 0 评论 303 浏览 评分:0.0
蓝桥杯算法提高VIP-欧拉函数 (Java代码) 摘要:import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.Scanner; public cl…… 题解列表 2022年03月10日 0 点赞 0 评论 329 浏览 评分:0.0
相当之简单粗暴 摘要:解题思路:注意事项:参考代码#includeusing namespace std;int main(){ int x,y,num=0; while(cin>>x>>y){ …… 题解列表 2022年03月10日 0 点赞 0 评论 369 浏览 评分:6.0
优质题解 递增三元组(C代码) 摘要:看到这道题第一想法肯定是暴力解决,居然暴力也能AC,然后我提交到蓝桥杯官网发现果然没有这么简单,直接运行超时。。。 解题思路:题面上有数字大小的条件(Ai < Bj < Ck),就要联想到排序了;首…… 题解列表 2022年03月10日 1 点赞 1 评论 1217 浏览 评分:9.3
蛇行矩阵递归解法 摘要:解题思路:设每个数字坐标(x,y),m[x][y]为(x,y)处打印的值,观察下图: 1 3 6 10 15 2 5 9 14 4 8 13 7 12 11 举个例子: 2下面是4,左边…… 题解列表 2022年03月10日 0 点赞 0 评论 395 浏览 评分:0.0
做题记录2022.3.10(ac:100%) 摘要:解题思路:暴力,但不完全暴力注意事项:参考代码:string = input().strip() length = len(string) max_len = float("-inf") # 参…… 题解列表 2022年03月10日 0 点赞 0 评论 357 浏览 评分:0.0
兰顿蚂蚁-简单易懂 摘要:```cpp #include #include using namespace std; int maze[105][105]; struct Ant { int x, y; ch…… 题解列表 2022年03月10日 0 点赞 0 评论 496 浏览 评分:9.9
1873: 蓝桥杯2017年第八届真题-合根植物-----C++代码 摘要:解题思路:并查集思想: 1.初始化:每个结点的父亲结点首先设为它本身。 2.路径压缩(解决特殊情况下的树的层次深而造成的复杂度增大的问题) …… 题解列表 2022年03月10日 1 点赞 0 评论 465 浏览 评分:9.9
模拟回文日期 摘要:代码:#include<iostream> #include<algorithm> using namespace std; int n; bool isLeap(int y) { …… 题解列表 2022年03月10日 0 点赞 1 评论 500 浏览 评分:9.9