python--study||O.o 摘要:参考代码:column = int(input()) s = input() row = len(s) // column arr = [list(s[i * column: (i + 1) *…… 题解列表 2024年04月17日 0 点赞 0 评论 355 浏览 评分:0.0
编写题解 1126: C语言训练-字符串正反连接 摘要:解题思路:注意事项:strcat 连接两个字符串。参考代码:#include<string.h>#include<stdio.h>int main(){ char arr[102] = { 0 }, …… 题解列表 2024年04月17日 0 点赞 0 评论 403 浏览 评分:0.0
第一个HelloWord程序 摘要:解题思路:这题是大家入门C语言的简单题目注意事项:注意分行输出参考代码:#include<stdio.h>int main(){ printf("*************************…… 题解列表 2024年04月17日 0 点赞 0 评论 702 浏览 评分:9.9
母牛的故事 摘要:解题思路:此题可以参考斐波拉契数列思想,对母牛进行递归,算出n年后的母牛数量注意事项:此题需要注意当输入0时表示结束数据,所以要用到while的循环参考代码:#include<stdio.h>int …… 题解列表 2024年04月17日 0 点赞 0 评论 383 浏览 评分:9.9
3051: 登山 DP 摘要:解题思路:双向DP 从左至右上升, 从右至左下降注意事项:重复计算一个顶点, 结果减一参考代码:#include<iostream> #include<algorithm> using names…… 题解列表 2024年04月17日 0 点赞 0 评论 355 浏览 评分:9.9
python--study||O.o 摘要:参考代码:dx = (-1, 0, 1, 0) dy = (0, -1, 0, 1) def judge(x, y): if x == 0 or x == n - 1 or y …… 题解列表 2024年04月17日 0 点赞 0 评论 380 浏览 评分:0.0
编写题解 1138: C语言训练-求矩阵的两对角线上的元素之和 摘要:解题思路:注意事项:参考代码:n = int(input()) arr = [list(map(int, input().split())) for _ in range(n)] x, y = 0…… 题解列表 2024年04月17日 0 点赞 0 评论 548 浏览 评分:0.0
1024: [编程入门]矩阵对角线求和 摘要:解题思路:注意事项:参考代码:arr = [list(map(int, input().split())) for _ in range(3)] x, y = 0, 0 for i in rang…… 题解列表 2024年04月17日 0 点赞 0 评论 447 浏览 评分:0.0
3050: 最长上升子序列 摘要:解题思路:经典DP注意事项:答案不是f[n], 而是f数组的最大值参考代码:#include<iostream> #include<algorithm> using namespace std; …… 题解列表 2024年04月17日 0 点赞 0 评论 450 浏览 评分:9.9
python--study||O.o 摘要: 就是求内部矩形的大小,主要问题是根据题意判断起点和终点参考代码:#肿瘤与边缘之间必须被0分隔开(未完全分隔就不算答案) n = int(input()) arr = [list(m…… 题解列表 2024年04月17日 0 点赞 0 评论 474 浏览 评分:0.0