暴力解法,二维数组的转置 摘要:解题思路: 对于一个二维列表,转置即行列序数互换注意事项: 注意输入、输出格式参考代码:# 保证输入格式正确 my_list1 = list(map(int, input().strip().spl…… 题解列表 2024年05月02日 0 点赞 0 评论 310 浏览 评分:9.9
简单方法,不涉及函数内容 摘要:解题思路:注意事项:参考代码:n = int(input()) m = 0 k = [None] * 3 my_list = [list(map(int, input().strip().spl…… 题解列表 2024年05月02日 0 点赞 0 评论 199 浏览 评分:9.9
1314: 乘积最大 摘要:解题思路:f[i][j]表示到索引i数字字符插入j个乘号,所能得到最大的乘积。 初始化f[i][0] 为到i索引字符结束的整数(插入了0个乘号);r遍历字符从1到i个字符每种情况, 状态转移方程:f[…… 题解列表 2024年05月03日 0 点赞 0 评论 223 浏览 评分:9.9
信息学奥赛一本通T1276 -编辑距离 摘要:解题思路:f[i][j]表示i长度的字符串变化到j长度字符串的最短距离注意事项:参考代码:#include<iostream> using namespace std; const int N =…… 题解列表 2024年05月03日 0 点赞 0 评论 197 浏览 评分:9.9
简单易懂,结构体之时间设计 摘要:解题思路:平年2月28天,闰年2月29天,平年闰年分开考虑注意事项: 无参考代码:y, m, d = map(int, input().split()) day_num = d year1 = […… 题解列表 2024年05月04日 1 点赞 0 评论 230 浏览 评分:9.9
超简洁代码,结构体之成绩记录 摘要:解题思路:注意事项:参考代码:n = int(input()) # 定义一个空二维列表,用以存放输入数据 my_str = [[]] * n # 输入指定n组数据 for i in range…… 题解列表 2024年05月04日 0 点赞 0 评论 284 浏览 评分:9.9
信息学奥赛一本通T1277-方格取数(测试数据有误) 摘要:解题思路:dp 四维,二维均可,测试数据有误, 浪费很多时间注意事项:样例数据有误参考代码:#include<iostream> #include<cstring> #include<utilit…… 题解列表 2024年05月04日 0 点赞 0 评论 149 浏览 评分:9.9
信息学奥赛一本通T1278- 复制书稿 摘要:解题思路:分治, r为分治求出的最短时间,从后向前遍历书稿,将书稿复制边界存入res数组中注意事项:参考代码:#include#includeusing namespace std; const i…… 题解列表 2024年05月04日 0 点赞 0 评论 145 浏览 评分:9.9
信息学奥赛一本通T1279-橱窗布置 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cstring> using namespace std; const int N = 1e2 + 10; …… 题解列表 2024年05月04日 0 点赞 0 评论 227 浏览 评分:9.9
信息学奥赛一本通T1280-滑雪 摘要:解题思路:从任何一点出发寻找最长路径注意事项:参考代码:#include<iostream> using namespace std; const int N = 1e2 + 10; int g…… 题解列表 2024年05月05日 0 点赞 0 评论 99 浏览 评分:9.9