优质题解 地宫取宝(DFS+动态规划:记忆化递归) 摘要:以前都是用vis[ ][ ]数组判断该位置有没有被访问过,现在情况有所改动,除了位置,他还带着 “当前手中宝物价值的最大值:max” 以及 “当前手中宝物数:cnt”,所以开辟一个缓存数组cache[…… 题解列表 2022年01月27日 0 点赞 8 评论 1972 浏览 评分:9.3
[编程入门]自定义函数之字符串连接 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int fun(char x[],char y[]){ strcat(x,y);}int m…… 题解列表 2022年01月27日 0 点赞 0 评论 803 浏览 评分:7.3
1156: C语言训练-阿姆斯特朗数 摘要:解题思路:注意事项:提交答案,显示基本正确,格式错误,没看出格式有什么问题。参考代码:#include<stdio.h>int n,m,a,b,c;void fun1(){ for(n=999;…… 题解列表 2022年01月27日 0 点赞 0 评论 739 浏览 评分:0.0
编写题解 1131: C语言训练-斐波纳契数列 ```pythonl=[1,1]n=int(input())ifn==1:print(l[0])elifn==2:print('{}{}'.format(l[0],l[1]))else:foriinrange(2,n):s=l[i-1]+l[i-2]l.append(s)ifn>=3:foriinl: 题解列表 2022年01月27日 0 点赞 1 评论 602 浏览 评分:9.9
[编程入门]自定义函数之字符提取(c语言) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int fun(char x[],char b[]){ int n,l,j=0; …… 题解列表 2022年01月27日 0 点赞 0 评论 556 浏览 评分:9.9
python-判断名次 摘要:解题思路:注意事项:参考代码:from itertools import permutations def f(): rst = tuple(permutations(&#…… 题解列表 2022年01月27日 0 点赞 0 评论 754 浏览 评分:2.0
蓝桥杯基础练习VIP-Huffuman树——STL 思路:利用multisetd的有序性和自带的删除插入的操作,模拟题意例如:set.inser(x)向set中插入一个数x;set.erase(x)若x为迭代器则删去指向的数,若x为具体的数则删去与x相等的所有数;```#include#include#includeusingnamespacestd; 题解列表 2022年01月27日 0 点赞 2 评论 534 浏览 评分:9.9
母牛的故事 (结构体解决) 摘要:解题思路:注意事项:参考代码:#include "stdio.h"typedef struct shape { int sum; int age;} shape;int main() { int i=…… 题解列表 2022年01月27日 0 点赞 0 评论 478 浏览 评分:0.0
python-概率计算 摘要:解题思路:动态规划建立数组dp = [max(n,a,b,x)+1][(n+1)] 注意这里不要直接写成dp = [x+1][n+1],因为在后面的计算中数组可能会越界,没修改前题测为91分其…… 题解列表 2022年01月27日 0 点赞 0 评论 957 浏览 评分:0.0
python 容易理解 摘要:解题思路:注意事项:参考代码:ls =list(map(int,input().split()))while ls[0] != 0: lt = ls[1:] b=[] for i i…… 题解列表 2022年01月27日 0 点赞 0 评论 496 浏览 评分:0.0