堆优化版的Dijskra 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<queue> #include<vector> #include<cstring> using nam…… 题解列表 2024年02月07日 1 点赞 0 评论 381 浏览 评分:10.0
蓝桥杯算法提高VIP-单词个数统计 摘要:解题思路:注意事项: 1.string.h文件和strlen函数。 2.fgets函数:应该大家用C语言输入字符串时,用fgets函数,gets函数差不多已…… 题解列表 2024年02月07日 0 点赞 0 评论 381 浏览 评分:0.0
题解 1037: [编程入门]宏定义的练习 摘要:##思路 `a%b`即可。 ##代码 ```cpp #include using namespace std; int main(){ int a,b; cin>>a>>b; …… 题解列表 2024年02月07日 0 点赞 1 评论 433 浏览 评分:9.9
题解 1036: [编程入门]带参数宏定义练习 摘要:###思路 `swap(a,b);` ###代码 ```cpp #include using namespace std; int main(){ int a,b; cin>>a>…… 题解列表 2024年02月07日 1 点赞 0 评论 576 浏览 评分:9.9
1427: 蓝桥杯2013年第四届真题-买不到的数目 摘要:# 1427: 蓝桥杯2013年第四届真题-买不到的数目 ## 公式证明 这里使用到两个数学知识: * 若 a, b 互质,则 a,b 最大不能组成的数组为ab - a - b。 * 现在又两…… 题解列表 2024年02月07日 0 点赞 0 评论 716 浏览 评分:0.0
两个for循环+两个if语句 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){int i,n,N;scanf("%d",&N); for(i=2;i<=N;i++){ for(n=2;n<=…… 题解列表 2024年02月07日 0 点赞 0 评论 308 浏览 评分:0.0
精简版解法 摘要:解题思路:从最后一天反向推出桃子总数,第一天桃子只剩下一个,当天只吃了2*1+1即3个桃子,每一天吃的桃子都比当天剩下的桃子多两个。后一天剩下的桃子是今天吃的桃子和剩下桃子的总和。注意事项:因为最开始…… 题解列表 2024年02月06日 0 点赞 0 评论 335 浏览 评分:0.0
弟弟的作业 摘要:解题思路:使用cin逐个拿到用户输入的数据再进行计算即可注意事项:需要掌握string与int互相转换的方法string->int:1、通过 istringstream 转换#include <ios…… 题解列表 2024年02月06日 0 点赞 0 评论 377 浏览 评分:0.0
大一萌新小白解法 摘要:解题思路:创建-合并两个链表 - 归并排序即可注意事项 记得释放内存。参考代码:#include <stdio.h>#include <stdlib.h>typedef struct ListNode…… 题解列表 2024年02月06日 0 点赞 0 评论 410 浏览 评分:0.0