贪心+二分+逆序获取最小字典序输出 摘要:解题思路:首先得知道什么是最长递增子序列LIS,自行百度,一般有两种做法,一种是一维线性dp复杂度为n^2,另一种是贪心+二分,符合本题的要求。1、很明显游客名单这是一个严格递增子序列,那就按规则建立…… 题解列表 2024年05月22日 0 点赞 0 评论 602 浏览 评分:9.9
利润计算(c语言) 摘要:解题思路:将利润除以100000,所得数使用switch函数进行选择。注意事项:参考代码:#include int main(){ int i,t; scanf("%d",&i); int…… 题解列表 2024年05月22日 0 点赞 0 评论 443 浏览 评分:9.9
蓝桥杯2022年第十三届决赛真题-出差 摘要:解题思路:基本上是裸的单源最短路将隔离天数加入到行程花费时间当中,也就是从城市a到城市b需要花费a城市隔离天数加上a到b道路的天数注意事项:n可以等于1从1城市出发不需要隔离参考代码:#include…… 题解列表 2024年05月22日 0 点赞 0 评论 642 浏览 评分:0.0
1047 报数问题(一维数组遍历求解) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n; scanf("%d",&n); int a[n+2]; for(int i=1;i<=n;i++)…… 题解列表 2024年05月22日 0 点赞 0 评论 336 浏览 评分:0.0
二级C语言——平均值计算 摘要:解题思路:先在循环中把十个数输入并加起来,之后在另一个循环中挨个跟平均数比较,用k统计大于平均数的数;注意事项:需要使用float参考代码:#include <stdio.h>int main(){ …… 题解列表 2024年05月22日 4 点赞 0 评论 1152 浏览 评分:9.9
蓝桥杯2022年第十三届决赛真题-卡牌 摘要:注意事项:m记得开long long参考代码:#include<bits/stdc++.h> using namespace std; struct node { long long a; …… 题解列表 2024年05月22日 0 点赞 0 评论 656 浏览 评分:0.0
蓝桥杯2022年第十三届决赛真题-齿轮 摘要:解题思路:通过列出算式 q=a1/a2*a2/a3*a3......an-2/an-1*an-1/an发现可以约掉中间部分只剩下头尾得到q=a1/an阅读题目发现q为整数,那么可得 a1%an=0且a…… 题解列表 2024年05月22日 0 点赞 0 评论 600 浏览 评分:0.0
万变不离其宗 叫我老翟 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <stdlib.h> typedef struct node { int start, end,…… 题解列表 2024年05月22日 0 点赞 0 评论 901 浏览 评分:9.9
万变不离其宗 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #define N 10010 int f[N], w[N], v[N]; int main() { i…… 题解列表 2024年05月22日 2 点赞 1 评论 585 浏览 评分:9.9
最长公共子序列 摘要:解题思路:从繁至简注意事项:c参考代码:#include <stdio.h>#include <string.h>int max(int a, int b) { if (a >= b) retu…… 题解列表 2024年05月22日 0 点赞 4 评论 660 浏览 评分:9.9