蓝桥杯2018年第九届真题-日志统计(排序 + 双指针) 摘要:####解题思路 1.把“点赞”日志按 ts 时间从小到大排序。 2.用 i 和 j 指针维护区间 [T, T+D) 。 3.记录区间 [T, T+D) 点赞数。 ####参考代码 ``…… 题解列表 2023年03月14日 0 点赞 0 评论 577 浏览 评分:9.9
[编程入门]最大公约数与最小公倍数,递归 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int gcd(int m,int n){ if(m%n==0) return n…… 题解列表 2023年03月14日 0 点赞 0 评论 344 浏览 评分:0.0
c++二维数组的转置(最简单方法) 摘要:解题思路:a[0][0] a[0][1] a[0][2] a[1][0] a[1][1] a[1][2] &nb 题解列表 2023年03月14日 0 点赞 1 评论 381 浏览 评分:8.0
1268: 第K极值 摘要:```cpp #include using namespace std; const int maxn=10001; int n,k,arr[maxn],ans; string is_pre…… 题解列表 2023年03月14日 0 点赞 0 评论 681 浏览 评分:9.9
用vector容器 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<vector>#include<string>using namespace std;int main(){ vec…… 题解列表 2023年03月14日 0 点赞 0 评论 418 浏览 评分:0.0
时间显示--简短易理解 摘要:解题思路:既然不要求显示毫秒,那么最后毫秒的数值不影响我们要显示的时分秒,直接将其舍去即可;将所给的毫秒值转化为秒数值ps,然后对其分析:首先考虑要显示的秒数()因为秒数的取值范围是0-59,所以对 …… 题解列表 2023年03月14日 0 点赞 0 评论 443 浏览 评分:0.0
单词分析--实现代码 摘要:参考代码:#include <bits/stdc++.h> using namespace std; string s; int nu[27]; int main() { cin>>s…… 题解列表 2023年03月14日 0 点赞 0 评论 460 浏览 评分:6.5
第一次写题解,我觉得应该还是比较清晰 摘要:解题思路:解题思路简单,一个循环就搞定了;注意事项:主要要注意那个最后一段路程不用加(其实就是这个题目出的不严谨)参考代码:#include<iostream>#include<iomanip>usi…… 题解列表 2023年03月14日 0 点赞 0 评论 384 浏览 评分:0.0
1708: 数据结构-Dijskra(迪杰斯特拉)最短路径算法 摘要:解题思路:看了优质题解的代码,感觉有点复杂,我的代码52行解决注意事项:不存在要输出-1参考代码:#include<iostream> #include<cstring> #include<cma…… 题解列表 2023年03月13日 0 点赞 0 评论 524 浏览 评分:0.0
计数排序思想求解 摘要:解题思路:利用计数排序思想,输出时,直接输出计数数组的值即可,这里多申请一个数组用来做输出时的标记注意事项:用到排序算法记得加头文件参考代码: …… 题解列表 2023年03月13日 0 点赞 0 评论 387 浏览 评分:9.9