随笔分类 -  ACM_POJ

POJ-3468-A Simple Problem with Integers
摘要:POJ-3468-A Simple Problem with Integershttp://poj.org/problem?id=3468成段更新线段树#include<stdio.h> #include<string.h> #include<stdlib.h> #define N 100005 int num[N]; struct cam { int x; //起点 int y; //终点 __int64 sum; //和 int add; //增量 }list[N*4]; void build(int k,int x,int y) { int mid; 阅读全文

posted @ 2012-07-20 16:17 java课程设计例子 阅读(148) 评论(0) 推荐(0)

POJ-3264-Balanced Lineup
摘要:POJ-3264-Balanced Lineuphttp://poj.org/problem?id=3264线段树,求区间的最大值与最小值之差#include<stdio.h> #include<string.h> #include<stdlib.h> #define N 50005 #define INF 0x7ffffff int num[N]; struct cam { int x; //起点 int y; //终点 int min; //最小值 int max; //最大值 }list[N*4]; int Min(int x,int y) { ret 阅读全文

posted @ 2012-07-18 22:39 java课程设计例子 阅读(219) 评论(0) 推荐(0)

POJ-2001-Shortest Prefixes
摘要:POJ-2001-Shortest Prefixeshttp://poj.org/problem?id=2001找出能唯一标示一个字符串的最短前缀,如果找不出,就输出该字符串用字典树即可#include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> using namespace std; char list[1005][25]; struct node { int count; node *childs[26]; node() { count=0; int i; f 阅读全文

posted @ 2012-07-16 22:09 java课程设计例子 阅读(243) 评论(0) 推荐(0)