自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

tianming_fan的专栏

成长中的菜鸟

  • 博客(19)
  • 收藏
  • 关注

原创 poj 3253 哈夫曼树

#include #include #include #include #include #include #define MAX 20010using namespace std;long long  Q[MAX];long long  Index;long long  Cos

2011-07-27 11:31:38 201

原创 532 3Ddfs- Dungeon Master

#include #include #include #define MAX 35using namespace std;int q[MAX][MAX][MAX];int visit[MAX][MAX][MAX];int sx,sy,sz,ex,ey,ez;int Q[10000

2011-07-25 08:51:53 235

原创 大整数模板

#include #include #include #include #include using namespace std;const int MAXD = 10000, DIG = 9, BASE = 1000000000;//用int型数组存储,每一位存储九位数const unsigned long long BOUND = numeric_limits :: max ()

2011-06-19 20:51:00 288

原创 火影

 即使一招失败也坚信自己能赢 继而考虑下一招  自信的力量会成为改变命运的力量

2011-06-19 13:34:00 239

原创 uva 727 运算符 中缀到后缀的转换

<br />卡了好久好久    一直没敢在动   今天一遍AC    <br /> <br />#include <iostream><br />#include <cstdio><br />#include <cstring><br />#include <cctype><br />#include <stack><br />using namespace std;<br />stack<char>operat;<br />int main()<br />{<br />    //freopen("in.

2011-05-31 20:05:00 547

原创 uva 101 the blocks problem

<br />简单模拟   水过   

2011-05-31 18:49:00 240

原创 uva 10003

<br />//没想到测试数据这么多  竟因为memset超时   耗费了整整一天时间<br /> <br />#include <string.h><br />#include <stdio.h><br />#define MAX 1010<br />int c[MAX][MAX];<br />int x[MAX]; // ·Ö¸îλÖÃ<br /><br />int search(int cas,int length)<br />{<br />    int i,j,k;<br />    for(i

2011-05-23 17:15:00 312

原创 矩阵连乘

<br />#include <iostream><br />#include <cstring><br />#include <cstdio><br />#define MAX 1000<br />using namespace std;<br />int m[MAX][MAX];<br />int s[MAX][MAX];//fenge qingkuang<br />int count = 0;<br />void MatrixChain(int p[],int n,int m[][MAX],int s

2011-05-18 21:24:00 383 1

原创 uva 540 team queue

<br />//  别人的代码  <br /> <br /> <br /> <br />#include <iostream><br />#include <cstdlib><br />#include <cstring><br />#include <cstdio><br />#include <string><br />#define MAXN 1000010<br />#define MAXT 10000<br />using namespace std;<br />typedef struct Li

2011-05-03 16:13:00 461

原创 uva 594 One Little, Two Little, Three Little Endians

<br />//开始没理解好题意卡了很长时间<br /> <br /> <br /> <br /> <br />#include <stdio.h><br />#include <string.h><br />#include <stdlib.h><br />void toer(char *s,int n)<br />{<br />    int i;<br />    if(n < 0){s[0] = '1'; n = -n;}<br />    else<br />       s[0] = '0';<

2011-04-26 23:55:00 835

原创 C - Extended Lights Out

<br />// wa一次    PUZZLE #1  中间小了个空格      <br />注意: 眼看到的不一定为真<br /> <br /> #include <stdio.h><br />#include <string.h><br />void change(int x,int ca[][9],int i,int j)<br />{<br />    if(x == 1)<br />    {<br />        ca[i][j] = (ca[i][j]+1)%2;<br />       

2011-04-05 15:08:00 592

原创 G //一遍ac

<br />// 现学的约瑟夫问题,用时有点长  ,   还不够深入理解<br /> <br />#include <stdio.h><br />int find(int n,int m)<br />{<br />    int a[200];<br />    int i,j,p ;<br />    p = n;<br />    for(i = 1; i < n ;i++)<br />        a[i] = i + 1;<br />    a[n] = 1;<br />    a[n] = a[

2011-04-02 23:55:00 221

原创 五天一小水 D - Gamblers

// wa  了一次    水过   但耗时间太多    开始时没考虑负数的情况   #include #include #include int cmp_int(const void *a,const void *b){    return *(int *)a - *(int *)b;}int main(){    int i,j,k;    int num[1010];    int n;    while(scanf("%d",&n) && n != 0){        for(i = 0;i   

2011-03-31 16:25:00 296

原创 uva-120 stack of flapjacks

//wa 一次   没考虑  1 1 1 1 1 的情况#include #include #include int cmp_int(const void *a,const void *b){    return *(int *)b - *(int *)a;}int Find(int f,int num[],int n){    int i;    for(i = n-1;i >=0;i--)     if(f == num[i]) return i+1;}void Flip(int num[],int n

2011-03-29 13:41:00 260

原创 uva - 573 the snail

<br />水 但wa一次   将此句 The snail never climbs a negative distance 忽略

2011-03-28 23:16:00 275

原创 uva-846 steps

<br />wa一次  忽略了0  以后一定不能再犯

2011-03-28 16:43:00 339

原创 uva-10785 The Mad Numerologist wa两次 忘了排序 第二次忘了写cmp_char 函数

<br />//<br /> <br />char vowel[6] = "AUEOI";<br />    char con[22] = "JSBKTCLDMVNWFXGPYHQZR";<br /> <br />            +<br /> <br />  for(i = 0;i < n/2;i++){<br />             printv[countv++] = vowel[a];<br />             printc[countc++] = con[b];<br />

2011-03-28 15:41:00 446

原创 uva-400 Unix is 水 但因看题不仔细 输出错误 wa了一次

<br />#include <stdio.h><br />#include <string.h><br />#include <stdlib.h><br />int cmp_str(const void *a,const void *b)<br />{<br />    return strcmp((char *)a,(char *)b);<br />}<br />int main()<br />{<br />    int n,i,j,k;<br />    char a[110][65];<br />

2011-03-27 21:07:00 319

原创 uva - 10474

<br />#include <stdio.h><br />#include <stdlib.h><br />#include <string.h><br />int intcmp(const void *a,const void *b)<br />{<br />    return (*(int *)a - *(int *)b);<br />}<br />int _Bsearch(int f,int *count,int n) //二分查找下界<br />{<br />    int mid,left =

2011-03-21 22:25:00 427

空空如也

空空如也

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

TA关注的人

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