题目 1770: [编程入门]链表之报数问题 摘要:解题思路:注意事项:参考代码: #include <iostream>using namespace std;struct person{ int num; person* next;};int ma…… 题解列表 2023年10月20日 0 点赞 0 评论 333 浏览 评分:9.9
贪心智力大冲浪 摘要:解题思路: n个时段n个游戏,每个时段只能玩一个游戏,所以只需要给玩的游戏排个次序使总罚款最小。贪心点:按时段依次选择ddl(截止时间)最前的先玩,不着急的后玩,如果ddl相同则wi罚款多的先玩罚款…… 题解列表 2023年10月20日 0 点赞 0 评论 508 浏览 评分:9.9
字符串判等(不要a[i]==' '这么用,可能会报错,你用strcmp()比较字符串函数或者isspace()判断是否为空格的函数都行) 摘要:解题思路:注意事项:参考代码:#include#includeint main() { char a[100],b[100]; gets(a); gets(b); int len_a…… 题解列表 2023年10月20日 0 点赞 5 评论 633 浏览 评分:9.9
0~1000以内的水仙花数的判断 摘要:解题思路:通过将整数分别分解为100、10、1的倍数,然后将这些因数进行重组,若能按照水仙花数的规则重组成功,即为水仙花数。注意事项:看了一下其他人的解法,发现若不设变量的话,容易使代码看起来比较冗长…… 题解列表 2023年10月20日 0 点赞 0 评论 331 浏览 评分:0.0
贪心同学的等待 摘要:解题思路: 动作快的排前面,墨迹的排后面注意事项:参考代码:# 超时了 N = int(input()) list = [int(i) for i in input().split()] lis…… 题解列表 2023年10月20日 1 点赞 0 评论 338 浏览 评分:6.0
大整数的因子(注意高位的余数) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<string.h> void m(int *a1,char a[],int len_a)//a1用指针传递回主函…… 题解列表 2023年10月20日 0 点赞 0 评论 354 浏览 评分:0.0
利用double求解 摘要:参考代码:#include<stdio.h>#include<math.h>int main(void){double C,F;scanf("%lf",&F);C=(5*(F-32))/9;print…… 题解列表 2023年10月20日 0 点赞 0 评论 337 浏览 评分:0.0
蓝桥杯2023年第十四届省赛真题-更小的数(入门必备,简单易懂) 摘要:解题思路:原字符串:210102一共有 8 种不同的方案:1)所选择的子串下标为 0 ∼ 1 ,反转后的 numnew = 120102 < 210102 ;2)所选择的子串下标为 0 ∼ 2 ,反转…… 题解列表 2023年10月20日 0 点赞 5 评论 1698 浏览 评分:9.3
大整数减法(使用指针递减输出结果) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<string.h> #define MAXSIZE 200 int main() { char a[MA…… 题解列表 2023年10月19日 0 点赞 0 评论 294 浏览 评分:0.0
手写队列解决滑动窗口 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;const int N = 1e7 + 10, M = …… 题解列表 2023年10月19日 0 点赞 0 评论 379 浏览 评分:0.0