2128: 信息学奥赛一本通T1264-合唱队形 最长的双向递增子序列 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int main(){ // 定义变量n表示数组长度,a数组存储输…… 题解列表 2024年12月15日 0 点赞 0 评论 136 浏览 评分:0.0
推断不重要或重复关系 摘要:解题思路:1. 在 main 函数中,首先定义了两个整数 n 和 m 用于存储关系的数量和节点的数量。2. 定义了一个整数数组 root ,初始时 root[i] = i ,表示每…… 题解列表 2024年12月15日 1 点赞 0 评论 145 浏览 评分:0.0
2126: 信息学奥赛一本通T1263-友好城市 最长不下降子序列 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 定义结构体f,包含两个整数成员xi和yi struct f{ …… 题解列表 2024年12月15日 0 点赞 0 评论 125 浏览 评分:0.0
贝西的训练 摘要:解题思路:1. 在 main 函数开头,定义了整数变量 M (奶牛进山的总时间)、 T (路段数量)、 U (上坡时间)、 F (平路时间)、 D (下坡时间),并通过 scanf 函数从用…… 题解列表 2024年12月15日 0 点赞 0 评论 148 浏览 评分:0.0
纯新手for循环 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[10]; for(int i=0;i<10;i++){ scanf("%d",&a[i]); }…… 题解列表 2024年12月15日 4 点赞 0 评论 571 浏览 评分:10.0
信息学奥赛一本通TT1262-挖地雷 差点睡不着觉 服了 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; struct f{ int xi,yi; }t[20005]; …… 题解列表 2024年12月15日 0 点赞 0 评论 153 浏览 评分:0.0
3052: 最大上升子序列和 dp做法简单秒懂 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int main(){ // 定义变量n和数组a、dp,其中a存储…… 题解列表 2024年12月14日 1 点赞 0 评论 120 浏览 评分:10.0
1301: 尼克的任务 常规做法 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 定义两个数组,dp用于存储动态规划结果,kk用于记录每个位置的工作个数…… 题解列表 2024年12月14日 0 点赞 0 评论 175 浏览 评分:0.0
[NOIP2001]装箱问题 dfs超时的看这里 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int v,n,kkk[35]; int a[35]; bool vis…… 题解列表 2024年12月14日 0 点赞 0 评论 174 浏览 评分:0.0
1282: 公交汽车 dp和dfs 还是dfs更好用 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int a[11],n,kkk[110]; void dfs(int x,…… 题解列表 2024年12月14日 0 点赞 0 评论 214 浏览 评分:0.0