自定义博客皮肤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)
  • 收藏
  • 关注

转载 2386 Lake counting

#include #include #include #include using namespace std;int n,m;int map[110][110],visit[110][110];int cou,fi,fj;int dir[16] = {0,1,0,-1,1,0,-1,0,1,1,1,-1,-1,1,-1,-1};int find(){ for(int i=1

2014-12-07 11:57:05 372

转载 poj 2002

#include #include #define N 1000struct Point { int x; int y;};struct Point point[N];int n; /* 点的个数 *//* 由于点已经按照坐标排序过,所以采用二分查找 * 搜索点(x,y)是否存在,存在返回1,否则返回0 */int bsearch(int x, int y){

2014-12-07 11:44:50 401

原创 poj 2698

八皇后问题原题大意就是棋盘上有八个皇后,但是这八个不能再一直线出现,求各个皇后能够个不伤害的排法#include#include#define max 8int sum=0,queen[max];void print(){ int i,j; printf("NO:%d\n",++sum); for(i=0;i<max;i++) {

2014-11-30 14:11:16 538

原创 heu acm基础训练之1002

hanoi塔:原题大意我就不说明了,大家懂得#includevoid move(int n,char x,char y){printf("move %d from %c to %c\n",n,x,y);}int hanoi(int n,char x,char y,char z){if(n==1)move(1,x,z);else{hanoi(n-1,x,z,y);mo

2014-11-30 14:05:30 648

原创 heu acm基础训练 1001

哈尔滨工程大学 online judge acm训练之分治算法原题大意:求a ,b,之间的数有多少个1,包括a,b.这题典型的分治算法;举例说明:以197为例:那么我们将其分为个位,十位,个位7上有一个,那么在190~197上有7+1个然后整十位上的为18,即197/10-1,然后其权值将变为10。如此进行。源代码:#include#define N 11i

2014-11-30 13:40:35 767

原创 poj 3177

素数筛选:求出包括(,y)

2014-11-23 16:59:27 378

原创 poj 1012

JOSEPHS原题大意:    k个好人和

2014-11-19 18:27:12 496

原创 poj 2757

求最大上升子序列

2014-11-18 21:32:40 563

原创 poj 2756

利用二叉树的性质:lchild=2*

2014-11-16 17:04:24 398

原创 poj 1011

这道题我还是用回溯法+剪枝

2014-11-16 16:50:23 396

转载 hdu 1045

题目大意:要求:碉堡不能在同一行、

2014-11-16 13:14:24 357

原创 poj 1065

原题大意:第一个

2014-11-09 16:32:55 346

原创 poj 1006

木棍:

2014-11-09 16:09:15 367

原创 poj 1008

玛雅历,这道题的题意

2014-11-09 16:07:46 361

原创 poj百练1565

原题大意:如果一个数是十进制

2014-11-09 15:51:56 380

原创 poj百练 2694

#include#include#include#includetypedefstructstacknode{char stack[100];int top;}Stack;doublecal(char op,double a,double b){switch(op){case'*':return a*b;break;case'/':return b/a;break;ca

2014-11-02 13:57:58 556

原创 poj 1003

原题大意:    将卡片

2014-11-02 13:40:34 354

原创 poj 3038

#includeintmain(){int n,m,i,j,k,min,max=0;char data[101][51];int flag[101]={0};int len[101]={0};scanf("%d%d",&n,&m);for(i=0;im;i++){scanf("%s",&data[i]);for(j=0;jn;j++)for(k=j+1;kn;k++)if(da

2014-10-26 14:40:59 674

原创 poj 2675

此题可认为是水题。不做分析

2014-10-26 14:24:41 663

原创 poj百练 1002

一开始我没看清题目要求的输出是

2014-10-26 12:46:26 1171

空空如也

空空如也

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

TA关注的人

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