![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
HUD
VVVGG
不积跬步无以至千里
展开
-
HDU--3333
题意就是让你求给定数的区间和,数值相同只加一次 题目链接:HDU-3333 主要就是区间右端点排序和这句话“对于要查询的区间,它的右端点固定后,那么重复的数字便是右面开始最后一次出现的” AC代码: #include #include #include #include #include using namespace std; #define MM(x,y) memset(x,y,siz原创 2017-07-11 10:53:19 · 317 阅读 · 0 评论 -
HDU 1372——DFS
//点击打开链接//DFS的模板题#include #include #include #include #define MM(x,y) memset(x,y,sizeof(x)) using namespace std; struct node { int x; int y; int pos; }; queuea; char e[5],s[5]; int vis[30][原创 2017-07-04 13:56:19 · 243 阅读 · 1 评论 -
HDU--1241 简单DFS
题目链接:点击打开链接 遍历整个图,把‘@’变成‘*’,统计次数 AC代码: #include #include #include #include #include using namespace std; typedef long long ll; const int N=1000; struct Node { int x; int y; }; int n,m; #def原创 2017-07-04 15:15:32 · 214 阅读 · 0 评论 -
HDU-1548
坐电梯 只能上和下,走过的楼层是当前所存数乘以1或者-1 题目链接:点击打开链接 AC代码:#include #include #include #include #define MM(x,y) memset(x,y,sizeof(x)) using namespace std; const int N=300; int a[N]; struct node{ int x; l原创 2017-07-05 10:59:47 · 201 阅读 · 0 评论 -
HUD_1556_树状数组基础
网上关于树状数组有很多讲解,我就不说了(其实是领悟不够彻底。。。。) 先上个题目的链接点击打开链接 先向下更新加一遍 update(y,1); 然后把更新多余的内容在取消掉update(x-1,-1);然后向上取和#include #include #include #define MM(x,y) memset(x,y,sizeof(x)) using namespace std; con原创 2017-07-03 09:41:49 · 212 阅读 · 0 评论 -
来一道水题 KMP算法---HDU2087
看了一天的KMP 先来一道水题 试试KMp的水深不深然而还是在CE7次之后才过 题目原网址:http://acm.hdu.edu.cn/showproblem.php?pid=2087 AC代码: #include #include using namespace std; typedef int ll; ll nextval[1010]; void getnext(ch转载 2016-04-18 21:44:45 · 291 阅读 · 0 评论 -
杭电1061-弄懂快速幂
杭电1061 快速幂做法 源题网址:http://acm.hdu.edu.cn/showproblem.php?pid=1061 Problem Description Given a positive integer N, you should output the most right digit of N^N. Input原创 2016-03-15 22:55:34 · 392 阅读 · 0 评论 -
HDU-2717
这题和1548没啥区别,但是中间还是出现了几波迷之错误 链接:点击打开链接 AC代码: #include #include #include #include #define MM(x,y) memset(x,y,sizeof(x)) typedef long long ll; using namespace std; const int N=1000000; int原创 2017-07-05 13:34:47 · 350 阅读 · 0 评论