自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 资源 (25)
  • 收藏
  • 关注

原创 hdu 3183 A Magic Lamp

http://acm.hdu.edu.cn/showproblem.php?pid=3183题意:从一个数里删除n个数字,使其最小分析:只需判断第i个数是否大于第i+1个数,实则删掉,否则继续寻找;注意0的存在,只要第二位数是0,直接删除第一个数即可,因为数的位数减少了#include#include#include#include#includeusing namespac

2013-07-30 20:08:02 528

原创 hdu 4070 Phage War

http://acm.hdu.edu.cn/showproblem.php?pid=4070题意:一个噬菌体周围有编号1~n个细胞,每一秒钟这个噬菌体就产生一个新的噬菌体,想要感染细胞需要:1)Di个噬菌体 2)Ti秒的到达时间,问最少需要多少时间可以使所有的细胞都被感染?分析:先感染需要到达时间最长的细胞,利用剩下时间繁殖噬菌体,然后更新最长时间#include#include#

2013-07-30 16:05:15 664

原创 【DFS】hdu 1518 Square

http://acm.hdu.edu.cn/showproblem.php?pid=1518#include#includeusing namespace std;const int NM=22;int a[NM],vis[NM],m,flag,tol;void DFS(int ans,int sum,int k){ int i; if(sum>tol) return;

2013-07-28 21:08:26 585

原创 hdu 2531 Catch him(迷宫)

http://acm.hdu.edu.cn/showproblem.php?pid=2531分析:没啥说的,只是把防守队员整体当成一个点即可#include#include#includeusing namespace std;const int NM=105;char str[NM][NM];int vis[NM][NM],n,m;int a[4][2]={-1,0,1,

2013-07-28 17:51:41 687

原创 hdu 3316 Mine sweeping(迷宫)

http://acm.hdu.edu.cn/showproblem.php?pid=3316分析:当遇到k=0时电脑会自动触发周围的8个方向点,8个方向中有地雷则不会点击该点,其余继续搜寻#include#include#include#includeusing namespace std;const int NM=105;char str[NM][NM];int a[8]

2013-07-27 23:14:49 765

原创 hdu 1239 Calling Extraterrestrial Intelligence Again

http://acm.hdu.edu.cn/showproblem.php?pid=1239分析:范围2~50000->10000,居然可以暴力成功,哎#include#include#includeusing namespace std;const int NM=10005;int pi[NM/2],a[NM];int main(){ int i,j,k,ans,m,

2013-07-26 22:01:33 447

原创 hdu 2612 Find a way(迷宫)

http://acm.hdu.edu.cn/showproblem.php?pid=2612分析:两个好基友在固定地点见面,分别对这两人BFS,注意要预先处理步数#include#include#includeusing namespace std;const int NM=205;const int MAX=0xfffff;char str[NM][NM];int a[4

2013-07-26 20:30:39 550

原创 hdu1238 Substrings

http://acm.hdu.edu.cn/showproblem.php?pid=1238分析:枚举+STL#include#include#include#include#includeusing namespace std;const int NM=105;string str[NM];bool comp(string A,string B){ if(A.si

2013-07-25 21:33:25 570

原创 hdu 1240 Asteroids!

http://acm.hdu.edu.cn/showproblem.php?pid=1240分析:三维数组,同二维相同,同类型:hdu 1253 胜利大逃亡#include#include#includeusing namespace std;const int NM=15;int a[6][3]={{-1,0,0},{1,0,0},{0,-1,0},{0,1,0},{0,

2013-07-25 20:20:24 545

原创 hdu 1597 find the nth digit

http://acm.hdu.edu.cn/showproblem.php?pid=1597法一:分析:由题意知,设n在Si序列,则:i*(i-1)解二元一次方程:i^2+i-2*n=0,即:i=(-1+sqrt(1+8*n))/2#include#include#includeusing namespace std;int main(){ __int64 T,

2013-07-25 18:29:34 594

原创 hdu 1445 Ride to School

http://acm.hdu.edu.cn/showproblem.php?pid=1445分析:原先把问题想麻烦了,其实只要理清思路就会发现,无论自己的车速会怎么变,最后一定会和一个人同时到达,那么计算这个人的到达时间即可其中,时间为负数的不用考虑,要么你追不上,要么他追不上你#include#include#include#includeusing namespace st

2013-07-24 23:14:47 697

原创 hdu 4296 Buildings(外一篇:hdu 4310 Hero)

http://acm.hdu.edu.cn/showproblem.php?pid=42分析:条件:A.w+A.s具体分析:http://blog.csdn.net/acm_ted/article/details/79849351) a=sum-si;b=sum+wi-sj;           交换两个板的位置2)b'=sum-sj;a'=sum+wj-s

2013-07-23 22:01:14 551

原创 hdu 4550 卡片游戏

http://acm.hdu.edu.cn/showproblem.php?pid=4550分析:就是前导可恶的0,然后利用字符串,大于序列第一个数的放右边,反之放左边(#include#include#include#includeusing namespace std;int main(){ string str,card; char t; int T,i,j,len

2013-07-23 20:03:28 643

原创 【字典树】hdu 2846 Repository

http://acm.hdu.edu.cn/showproblem.php?pid=2846分析:字典树,注意保存每一个子串#include#include#includeusing namespace std;const int NM=10005;char str2[22];struct Node{ Node *next[26]; //代表该点的26个指针 in

2013-07-21 01:07:19 626

原创 【字典树】hdu 1671 Phone List

http://acm.hdu.edu.cn/showproblem.php?pid=1671分析:字典树#include#include#includeusing namespace std;const int NM=10005;char str[NM][15];int flag;struct Node{ Node *next[10]; int id; Node()

2013-07-20 23:27:59 721

原创 hdu 2102 A计划

http://acm.hdu.edu.cn/showproblem.php?pid=2102分析:遇到‘#’就跳到另外一层,本来想到两层相同位置同时为’#‘会发生冲突,没想到还是脑抽了认为已经考虑到这种情况了,还狂找bug,看来还是不够细心和自信,努力之#include#include#includeusing namespace std;const int NM=11;cha

2013-07-19 23:32:26 567

原创 hdu 1175 连连看(外一篇)

http://acm.hdu.edu.cn/showproblem.php?pid=1175分析:因为转弯次数的限制,用一直走到底的方法,其他各种方法变换搜索方向顺序均不能通过,是错误的#include#include#includeusing namespace std;const int NM=1005;struct Node{ int x,y,turn;};int

2013-07-17 13:08:35 530

原创 【DFS】hdu 1045 Fire Net

http://acm.hdu.edu.cn/showproblem.php?pid=1045分析:从第一个点到最后一个点依此暴搜#include #include #include using namespace std;const int NM=10;char str[NM][NM];bool vis[NM][NM];int mmax,num,n;bool

2013-07-17 10:47:15 592

原创 hdu 1051 Wooden Sticks

分析:排序后,从小找到大,注意保存第一个不满足条件的stick,作为第二次查找的开始#include#includeusing namespace std;const int NM=5005;struct Stick{ int x,y;}st[NM];bool comp(struct Stick A,struct Stick B){ if(A.x<B.x) retur

2013-07-13 11:14:48 506

原创 【DFS】hdu 2553 N皇后问题

#include#includeint sum,n,hang[15],xie1[25],xie2[25];void DFS(int i){    int j;    if(i>n) sum++;    else    {for(j=1;j{if(!hang[j]&&!xie1[i+j]&&!xie2[n-i+1+j])  //列、对角线{hang

2013-07-03 18:23:04 724

共享文件夹的设立

文件共享,选择“安全”,可以看到此时可以访问这个文件夹的用户没有“Guest”,点击“添加”

2013-12-13

解决asf文件没有声音

asf格式的文件没有声音怎么办? 安装asf的音频解码器,然后重新打开文件

2013-10-20

SORT_SEARCH

数据结构实验各种排序和查找,如:哈希表、二分;归并、快排等

2013-06-04

哈夫曼树的实现

哈夫曼树的建立,编码及译码,各种实现细节,用优先队列选择

2013-04-22

挑战编程中文

学习acm的入门教材,包括基本内容和各种语法控制等

2013-04-17

离散数学的教材

离散数学是数据结构树和图的基本介绍,还有其他各种路基关系

2013-04-17

数据结构教材

数据结构学习的经典教材,大学计算机的必修课程

2013-04-17

杭电离线题库

杭电的离线题库,不用上网就可以刷题

2013-04-17

算法设计与分析

经典的算法学习,是acm的必备精品,虽然内容有点难理解

2013-04-17

算法导论

算法导论的中文版,学习计算机的必备良书,以及参考之用

2013-04-17

树状数组讲解

树状数组的基本实现,详解详细,十分清晰,适合初学者

2013-04-17

Linux+C+函数

很方便查照Linux下的各种C函数,还有例子哦

2013-04-17

二叉树的各种实现

1. 按先序序列构造一棵二叉链表表示的二叉树T; 2. 对这棵二叉树进行遍历:先序、中序、后序以及层次遍历,分别输 出结点的遍历序列; 3. 求二叉树的深度/结点数目/叶结点数目; 4. 将二叉树每个结点的左右子树交换位置; 5.非递归算法实现二叉树中序遍历。

2013-04-15

c and c 库函数手册

c and c 库函数手册,方便查找基本函数

2013-03-22

商品货架管理

问题描述] 商店货架以栈的方式摆放商品。生产日期越近的越靠近栈底,出货时从栈顶取货。一天营业结束,如果货架不满,则需上货。入货直接将商品摆放到货架上,则会使生产日期越近的商品越靠近栈顶。这样就需要倒货架,使生产日期越近的越靠近栈底。

2013-03-22

回文字符串

[问题描述] 对于一个从键盘输入的字符串,判断其是否为回文。回文即正反序相同。如“abba”是回文,而“abab”不是回文。

2013-03-22

Python基础教程(第2版)

Python基础教程(第2版)pdf,非常适合初学者

2013-03-13

约瑟夫环-各种实现

多种方法实现约瑟夫环,对线性数据结构有更好的理解

2013-03-13

基本控件功能

基本控件功能:编辑框的消失与再显示,组合框,单选框

2013-01-17

简单计算器

可实现log,1/x,ln,x^y等高级功能

2013-01-17

学生通讯系统

学生通讯系统:实现添加、修改、删除等功能

2013-01-16

学生管理系统

学生管理系统:实现添加、修改、删除等功能

2013-01-16

一个简单的绘图应用程序

一个简单的绘图应用程序:画圆、移动正方形、画线等

2006-03-14

空空如也

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

TA关注的人

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