最长上升子序列问题3-友好城市 摘要:## 最长上升子序列问题3 ### 注意事项 1.通过分析可以发现,符合标准的序列首先应该满足上下城市的编号都是递增的。 2.那么先对一边的坐标进行排序,再对另一边进行最长上升子序列问题的求…… 题解列表 2023年02月09日 1 点赞 0 评论 522 浏览 评分:9.9
最大上升子序列和-DP 摘要:#### DP问题 ####注意事项 - 与最长上升子序列问题思路相同,仅仅改变维护的信息。 ###### 代码 ``` #include #include using …… 题解列表 2023年02月09日 0 点赞 0 评论 586 浏览 评分:9.9
K-进制数题解 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int zuhe(int n,int m){ int z=1; for(int i=…… 题解列表 2023年02月09日 0 点赞 0 评论 370 浏览 评分:9.9
1002: [编程入门]三个数最大值c++代码 摘要:解题思路:先重大到小排序,再输出最大值。注意事项:要输最大值。参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a[…… 题解列表 2023年02月09日 0 点赞 0 评论 434 浏览 评分:9.9
自定义函数之数字分离(这样也行) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char arr[5]; gets(arr); int n = strlen…… 题解列表 2023年02月09日 0 点赞 0 评论 386 浏览 评分:9.9
自定义函数之字符串反转(除了hellow word 外简单的代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char str[100]; gets(str); int n = strl…… 题解列表 2023年02月09日 0 点赞 0 评论 400 浏览 评分:9.9
C语言训练-"水仙花数"问题1 简单解法 摘要:解题思路: 一 if else嵌套使用 二 明确求输入数字的各个位数上的数字的方法: 1.结合整形数据类型与除法求特定位数上的数字 …… 题解列表 2023年02月10日 1 点赞 0 评论 385 浏览 评分:9.9
1334: [NOIP2004]合唱队形 摘要:解题思路:这道题其实就是从前和从后来求两个不下降序列。 b[i]:从第i个数开始的最长不下降序列 c[i]:从第i个数结束的最长不下降序列 类似与登山。注意事项:注意>号和<号!参考代码:#in…… 题解列表 2023年02月10日 0 点赞 0 评论 590 浏览 评分:9.9
编写题解 1117: K-进制数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long LL;LL n,k,res;LL fac(in…… 题解列表 2023年02月10日 0 点赞 0 评论 364 浏览 评分:9.9
去掉空格(太折磨了,但这个代码大家都看得懂) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char str[100]; char ch; int i = 0,coun…… 题解列表 2023年02月10日 0 点赞 0 评论 404 浏览 评分:9.9