题解列表

筛选

c语言,动态规划求解

摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<string.h> #include<stdlib.h> int max(int x,int y) { ……

python-摆花摆花

摘要:解题思路:注意事项:参考代码:def f(n,m):       num = [0] + [int(i) for i in input().strip().split()]       dp = ……

复杂度O(n)版题解

摘要:解题思路:主要利用前缀和思想,一部分值要减掉,一部分值要加上。注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int m[27][3];//……

最简单(自定义函数之字符串反转)

摘要:解题思路:注意事项:参考代码:错误思路:对字符串进行降序正确思路:对字符串进行逆序操作def person(n):     print(n[::-1]) n=input() person(n)……

迭代思想 17行代码 完成 蛇行矩阵

摘要:解题思路:1.用外层循环 控制行数(此时需要n0 来保留原输入的n); 2.内层的第一个循环 通过n 控制列数 并 输出(t为输出的值,观察样本输出序列,每次需要自增 i+1 + j+1); 3.……