
数据结构
文章平均质量分 86
zhouchaoyuan
熟悉c/c++语言,对java有一定的了解,参加过程序设计竞赛,获得过湖南省二等奖,参加过邀请赛,获得过铜奖,对数据结构和算法有一定的认知!对于数据库也是比较熟悉!
展开
-
uva133
The Dole Queue In a serious attempt to downsize (reduce) the dole queue, The New National Green Labour Rhinoceros Party has decided on the following strategy. Every day all dole applican原创 2013-08-10 14:48:44 · 932 阅读 · 0 评论 -
zoj3195(一个关于LCA的应用,三个节点)
Design the cityTime Limit: 1 Second Memory Limit: 32768 KB Cerror is the mayor of city HangZhou. As you may know, the traffic system of this city is so terrible, that there are traffi原创 2014-08-08 12:43:45 · 1155 阅读 · 0 评论 -
uva10935(栈)
Problem B: Throwing cards away I 对于此题,我只能说很无奈,就是因为输入1的时候没有控制好,所以答案一直是错误的!Given is an ordered deck ofn cards numbered 1 tonwith card 1 at the top and card n at the bottom.The following operat原创 2013-06-20 13:39:07 · 2207 阅读 · 0 评论 -
hdu4496(并查集)
从后面到前面,把破坏桥看成建立桥,之后连通的集合反序输出就可以了#include #include#include#include#include#define maxn 100010int n,m;int fa[maxn],v[maxn],u[maxn],res[maxn];int find(int x){ return fa[x]==x?x:(fa[x]=fi原创 2013-09-16 15:19:14 · 1213 阅读 · 0 评论 -
hdu1698 Just a Hook(线段树)
Just a HookTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16052 Accepted Submission(s): 7984Problem DescriptionIn the game of Do原创 2014-07-16 16:17:32 · 697 阅读 · 0 评论 -
poj2828(线段树)
Buy TicketsTime Limit: 4000MS Memory Limit: 65536KTotal Submissions: 12459 Accepted: 6159DescriptionRailway tickets were difficult to buy around the Lunar New Y原创 2014-07-17 16:45:12 · 743 阅读 · 0 评论 -
uvalive3026(kmp)
#include#include#include#include#include#include#include#include#include#include#include#define Inf (1<<30)#define LL long long#define MOD 1000000009#pragma comment(linker, "/STACK:10240原创 2014-07-22 09:01:19 · 905 阅读 · 0 评论 -
uva540(队列)
Team Queue Queues and Priority Queues are data structures which are known to most computer scientists. The Team Queue, however, is not so well known, though it occurs often in everyday原创 2013-08-15 10:23:57 · 1142 阅读 · 0 评论 -
poj3468(线段树)
#include#include#include#include#include#include#include#include#include#include#include#define Inf (1<<30)#define LL long long#define MOD 1000000009#pragma comment(linker, "/STACK:10240原创 2014-07-16 18:30:59 · 887 阅读 · 0 评论 -
uva11234(树)
2007/2008 ACM International Collegiate Programming Contest University of Ulm Local ContestProblem E: ExpressionsArithmetic expressions are usually written with the operators in between the t原创 2013-08-15 14:18:20 · 953 阅读 · 0 评论 -
福州大学第十一届程序设计竞赛E fzuoj2171(线段树)
#include#include#include#include#include#include#include#include#include#include#include#define Inf (1<<30)#define LL long long#define MOD 1000000009#pragma comment(linker, "/STACK:10240原创 2014-07-16 18:11:38 · 1057 阅读 · 0 评论 -
uva548(树)
Tree You are to determine the value of the leaf node in a given binary tree that is the terminal node of a path of least value from the root of the binary tree to any leaf. The value of原创 2013-07-31 15:54:27 · 896 阅读 · 0 评论 -
uva11111(栈)
Problem B - Generalized Matrioshkas Vladimir worked for years making matrioshkas, those nesting dolls that certainly represent truly Russian craft. A matrioshka is a doll that may be ope原创 2013-08-12 20:11:19 · 859 阅读 · 0 评论 -
uvalive3942(字典树)
#include#include#include#include#include#include#include#include#include#include#include#define Inf (1<<30)#define LL long long#define MOD 20071027#pragma comment(linker, "/STACK:1024000原创 2014-07-21 16:54:43 · 886 阅读 · 0 评论 -
poj2352&&hdu1556&&poj2481(树状数组)
#include#include#include#include#define M 32001using namespace std;int res[M],d[M+1];int lowbit(int x){ return x&(-x);//巧妙二进制}void update(int x){ while(x<=M) { d[x]+=1; x+=lowbit(x);原创 2013-11-14 20:53:19 · 1033 阅读 · 0 评论 -
编程之美hiho一下第二周Trie树
时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Hi和小Ho是一对好朋友,出生在信息化社会的他们对编程产生了莫大的兴趣,他们约定好互相帮助,在编程的学习道路上一同前进。这一天,他们遇到了一本词典,于是小Hi就向小Ho提出了那个经典的问题:“小Ho,你能不能对于每一个我给出的字符串,都在这个词典里面找到以这个字符串开头的所有单词呢?”原创 2014-07-16 11:23:10 · 966 阅读 · 0 评论 -
uva442
Matrix Chain Multiplication Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Since matrix multiplication is associative, the order in which mul原创 2013-08-15 17:07:57 · 921 阅读 · 0 评论 -
hdu2586(LCA的一个例子,在线算法RMQ)
How far away ?Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5082 Accepted Submission(s): 1921Problem DescriptionThere are n hou原创 2014-08-08 12:13:37 · 1045 阅读 · 0 评论