蓝桥杯2014年第五届真题-兰顿蚂蚁 dfs解法 摘要:解题思路:还是按照dfs的模板来,只需要控制好蚂蚁的方向就可以,而且还不用回溯.注意事项:参考代码:#include<iostream> #include<algorithm> #include<…… 题解列表 2022年03月28日 0 点赞 0 评论 513 浏览 评分:9.9
蓝桥杯-分解质因数 摘要:#include int prime(int n)//判断质数 { for(int i=2;i*i<=n;i++){//只要能被整除,不是质数 if(n%i==0)return 0; …… 题解列表 2022年03月28日 0 点赞 0 评论 469 浏览 评分:9.9
python实现统计数字 摘要:先用字典将没有存储的数据依次存储进来,如果是第一次出现则将出现的次数置为一,出现过的则次数+1,最后用sorted给字典排序,关键值选择第一个值的参考代码:#统计数字n=int(input()) d…… 题解列表 2022年03月28日 0 点赞 0 评论 464 浏览 评分:9.9
编写题解 1182: 人民币问题 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<math.h>#include <iomanip>#define PI 3.1415using namespace …… 题解列表 2022年03月28日 0 点赞 0 评论 578 浏览 评分:0.0
编写题解 2015: 自动晾衣机 摘要:解题思路:注意事项:参考代码:l=int(input()) while True: try: ls=list(map(int,input().split())) …… 题解列表 2022年03月28日 0 点赞 0 评论 547 浏览 评分:0.0
看来我把题想的难了 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int sum,t;int main(){ char c; while(c =…… 题解列表 2022年03月28日 0 点赞 0 评论 509 浏览 评分:0.0
编写题解 1183: 人见人爱A+B 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; cin>>n; int a,b,c,d…… 题解列表 2022年03月28日 0 点赞 0 评论 404 浏览 评分:0.0
矩阵的幂【写个快速幂矩阵】 摘要:整数快速幂的求解:[快速幂][快速幂] 矩阵快速幂的不同,在于初始情况乘单位矩阵,而非乘1,并且采用矩阵乘法,而非普通整数乘法 ```cpp #include #include using …… 题解列表 2022年03月28日 0 点赞 0 评论 586 浏览 评分:9.9
自定义字符串连接(C语言-指针) 摘要:解题思路:一开始使用string.h的头文件,然后思考有没有不需要借用其他函数,自己进行可链接的函数,然后用指针想出下面的方法。仅仅是用指针的一种学习。参考代码:#include<stdio.h> …… 题解列表 2022年03月28日 0 点赞 1 评论 758 浏览 评分:8.0
编写题解 1184: 众数问题 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a[1000]; int n; cin>>n…… 题解列表 2022年03月28日 0 点赞 0 评论 415 浏览 评分:0.0