
ACM练兵
执迷的信徒
I believe I will become a true programmer,not a coder!
展开
-
HDOJ 1160 FatMouse's Speed
#include #include typedef struct s_mouse{ int id; int weight; int speed;}s_mouse;static s_mouse mice[1000];static int m[1000];static int s[1000];//static int p[1000];static原创 2011-11-18 14:02:54 · 1057 阅读 · 0 评论 -
HDOJ 1058 Humble Numbers
#include #include #include static int hnums[5842+1]={0,1};static void humble_number(){ static int pnums[8]={0}; pnums[2]=1; pnums[3]=1; pnums[5]=1; pnums[7]=1; int prime_factor原创 2011-11-19 20:31:24 · 719 阅读 · 0 评论 -
HDOJ 1159 Common Subsequence
#include #include #include #include static int m[1024][1024];static int com_sub_seq(const char *pstr1,const char *pstr2){ int len1=strlen(pstr1); int len2=strlen(pstr2); int i,j; f原创 2011-11-19 22:32:32 · 736 阅读 · 0 评论 -
CDOJ 1002 解救小Q
#include #include #include #define ROW_MAX_SIZE 50 #define COL_MAX_SIZE 50#define QUEUE_MAX_SIZE ROW_MAX_SIZE*COL_MAX_SIZEchar maze[ROW_MAX_SIZE][COL_MAX_SIZE]; //迷宫数组int cost[ROW_MAX_SIZE][原创 2011-11-25 15:56:56 · 3014 阅读 · 3 评论 -
HDOJ1003
#include #include #include typedef struct result{ int max_sum; int left; int right;}result;int seq[100001];result max_sub_sum(int n){ int thesum=0;//记录数组中从开始位置到当前位置的和 result res;//记录返回结果原创 2011-11-29 10:38:52 · 818 阅读 · 0 评论