自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 ahu-746-梯田二分+bfs

1数据水2二分查找加速#include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <queue> #include <iostream> #include <algorithm> using namespace std; int i,j,k,t,map[110][110],color[110][1

2015-09-25 17:53:06 428

原创 ahu-595-撒哈拉大冒险

坑点:输入不能一个个字符输入,跟hd不一样数据坑 思路 循环 x=(x%n+n)%n+搜索队列 交了我的和硕神的代码,200ms和80ms,只是因为我的是用queue库函数,硕神手撸stack,所以说亲手撸的要节省很多时间。 第一道无限循环的题学会很多。#include <cstdio> #include <cmath> #include <cstring> #include <cstdli

2015-09-24 22:40:20 459

原创 ahu 395 快速矩阵幂初学 + 矩阵快速幂模板

#include <cstdio> #include <string> #include <cmath> #include <iostream> using namespace std; const long long M = 10003; const long long N = 3; long long t,b,c=0,f1,f2; struct Node //矩阵 { long lon

2015-09-20 11:21:23 333

原创 快速矩阵幂模板

fn = b*fn-1 +a*fn-2 +c#include <cstdio> #include <string> #include <cmath> #include <iostream> using namespace std; const long long M = 1000007; const long long N = 3; long long t,b,c,f1,f2; struct Nod

2015-09-20 11:18:22 317

原创 ahu - 572

组合数学水题~~~#include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <queue> #include <stack> #include <set> #include <map> #include <time.h>//-----------------------分割线呵呵--------

2015-09-20 09:48:27 273

原创 ahu-497-最长起伏子序列

最长递增序列的变形dp,我又开始水了。。。。#include<cstdio> #include<cmath> #include<cstring> #include<cstdlib> #include<stack> #include<set> #include<queue> #include<map> #include<iostream> #include<algorithm> using names

2015-09-06 22:53:47 371

原创 hdu2199

他么的精度!!!!!#include<stdio.h> #include<string.h> #include<cmath> #include<cstdlib> #include<set> #include<queue> #include<algorithm> #include<iostream> using namespace std; int i,j,k,t; double n,l,r; do

2015-09-05 14:18:43 383

原创 二分模板

int binsearch(int *t,int k,int n) {//t为数组,k是要查找的数,n为长度,此为升序 int low = 1,high = n,mid; while(low<=high) { mid = (low+high)/2; if(k == t[mid]) return mid; else

2015-09-05 12:55:00 284

原创 SPFA模板

int used[Maxn],outqueue[Maxn],head[Maxn],low[Maxn],n,m; struct Edge { int to,w,next; }edge[Maxm]; bool SPFA (int start) { queue a; used[start] = 1; low[start] = 0; a.push(sta

2015-09-05 12:53:44 269

原创 ahu727美妙音乐

dp递推出第n个音符以1-m种音符结尾的最大值,然后输出这m个数的最大值,239ms,看前辈大牛14ms过的,不明觉厉。。#include<stdio.h> #include<string.h> #include<cmath> #include<cstdlib> #include<set> #include<queue> using namespace std; int n,m,i,j,k,t,x;

2015-09-05 10:06:32 791 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除