
蓝桥杯
Wenxin_Shen
这个作者很懒,什么都没留下…
展开
-
6.18
gcd讲解链接:https://blog.youkuaiyun.com/qq_34992845/article/details/53043339题目: hdu 6545代码:#include <cstdio>#include <iostream>;#include <stdio.h>using namespace std;int n;int minn = -100000;int gcd(int x,int y){//来求最大公约数 return (..原创 2020-07-05 00:44:19 · 194 阅读 · 0 评论 -
hdu 贪心
树二分搜索 +1回溯法递归和回溯树形dp贪心 hdu 1009#include<stdio.h>#include<string>#include<cstring>#include<iostream>#include<algorithm>using namespace std;const int maxn = 1005;const int inf = 1e5;int m,n;struct node{ int j原创 2020-07-05 00:43:57 · 167 阅读 · 0 评论 -
hdu 大数计算 进制转换 map的应用
蓝桥杯练习系统:题1 :刚开始的想法是将16进制转为十进制再转为二进制看了题解之后发现不能这么操作,要先将十六进制转化为二进制之后将2进制转为8进制。要点string 跟cin的应用。#include<stdio.h># include<iostream>#include<string.h># include<string>using namespace std;int n;int main(){ scanf("%d",&n)原创 2020-07-04 00:08:01 · 218 阅读 · 0 评论 -
hdu 背包问题
背包问题:知识点回顾:传送门:https://blog.youkuaiyun.com/yandaoqiusheng/article/details/84782655/0 1 背包问题(带排序) hdu 3466传送门:http://acm.hdu.edu.cn/showproblem.php?pid=3466题目:最近,iSea去了一个古老的国家。这么长时间以来,它是世界上最富有和最强大的王国。结果,即使这个国家不再富裕,这个国家的人民仍然感到非常自豪。商家是最典型的商家,每个商家仅售出一件商品原创 2020-06-30 17:49:06 · 333 阅读 · 0 评论 -
hdu 递归/递推
头文件整理:1、strlen 要用头文件cstring2、scanf 要用头文件#include <stdio.h>递归练习 hdu 1274#include<stdio.h>#include<iostream>#include<cstdio>#include<cstring> using namespace std;const int maxn = 255;int n;int len = 0;char s[m原创 2020-06-28 16:20:50 · 219 阅读 · 0 评论 -
hdu bfs/dfs
走迷宫#include<bits/stdc++.h>//1 Uint isout(int x,int y){ if(x < 0 || x > 10){ return 1; } if(y < 0 || y > 10){ return 1; } return 0;}int main(){ int n = 10; char t; int matrix[n][n]; for(int i = 0;i < n;i ++){ for(in原创 2020-06-26 15:25:25 · 212 阅读 · 0 评论 -
并查集 hdu
蓝桥杯6.15训练并查集 hdu1232#include<cstdio>#include<iostream>using namespace std;const int maxn = 1006;int pre[maxn];int num = maxn;int N,M;void init(){ for(int i = 1;i <= N;i ++){ pre[i] = i; } num = N-1; return ;}int find(原创 2020-06-16 14:42:08 · 273 阅读 · 0 评论