c语言,动态规划求解 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<string.h> #include<stdlib.h> int max(int x,int y) { …… 题解列表 2022年04月06日 1 点赞 0 评论 515 浏览 评分:7.3
python-摆花摆花 摘要:解题思路:注意事项:参考代码:def f(n,m): num = [0] + [int(i) for i in input().strip().split()] dp = …… 题解列表 2022年04月06日 0 点赞 0 评论 400 浏览 评分:9.9
复杂度O(n)版题解 摘要:解题思路:主要利用前缀和思想,一部分值要减掉,一部分值要加上。注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int m[27][3];//…… 题解列表 2022年04月06日 0 点赞 0 评论 709 浏览 评分:9.9
最简单(自定义函数之字符串反转) 摘要:解题思路:注意事项:参考代码:错误思路:对字符串进行降序正确思路:对字符串进行逆序操作def person(n): print(n[::-1]) n=input() person(n)…… 题解列表 2022年04月06日 0 点赞 0 评论 534 浏览 评分:9.9
迭代思想 17行代码 完成 蛇行矩阵 摘要:解题思路:1.用外层循环 控制行数(此时需要n0 来保留原输入的n); 2.内层的第一个循环 通过n 控制列数 并 输出(t为输出的值,观察样本输出序列,每次需要自增 i+1 + j+1); 3.…… 题解列表 2022年04月06日 0 点赞 0 评论 408 浏览 评分:9.9
Dijskra(迪杰斯特拉)最短路径算法 摘要:#include<bits/stdc++.h>using namespace std;int n, s, dis[55], scan[55], node[55][55], num, cur, inf …… 题解列表 2022年04月06日 0 点赞 0 评论 495 浏览 评分:9.9
非常容易理解(自定义函数之字符串连接) 摘要:解题思路:注意事项:参考代码:def person(h,s):#输入的参数 h=h+s#拼接字符串 print(h) #类型都为字符串 h=input() s=inp…… 题解列表 2022年04月06日 0 点赞 0 评论 1010 浏览 评分:9.9
将原有列表拆分为两个列表,将其中一个列表更换次序直到与原来相同,与另外一个列表进行比较 摘要:解题思路:注意事项:参考代码:while True: a=list(map(int,input().split())) x=a[0] a=a[1:] xx=a[0:x] …… 题解列表 2022年04月06日 0 点赞 0 评论 403 浏览 评分:8.0
全网最容易理解(自定义函数之字符提取) 摘要:解题思路:注意事项:参考代码:def person_pratice(n): s=['a','e','i','o','u…… 题解列表 2022年04月06日 0 点赞 0 评论 353 浏览 评分:9.0
蓝桥杯2018年第九届真题-乘积最大 摘要:```cpp #include #include using namespace std; typedef long long LL; const int N = 100000; cons…… 题解列表 2022年04月06日 0 点赞 0 评论 692 浏览 评分:9.3