书山有径勤为路>>>>>>>>

<<<<<<<<学海无涯苦作舟!

2011年10月2日

sscanf 你会用吗?

摘要: DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you understand them.InputInput consists of up to 100,000 dictionary entries, followed by a blank line, followed by a message 阅读全文

posted @ 2011-10-02 17:21 More study needed. 阅读(241) 评论(0) 推荐(0) 编辑

Trie解决POJ 2503

摘要: 题目:http://poj.org/problem?id=2503就是一个字典树的简单应用, 不解释。View Code #include "iostream"using namespace std;typedef struct node{ char word[21]; int mark; struct node * next[26];}node;node * root;void InitRoot(){ root = new node(); root->mark=0; memset(root->next, NULL, sizeof(root->next)) 阅读全文

posted @ 2011-10-02 17:10 More study needed. 阅读(277) 评论(0) 推荐(0) 编辑

线段树和下移操作解决HDOJ 1698

摘要: Problem DescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the same length.Now Pudge wants to do some operations on the hook.Let us number the consecutive metallic stick 阅读全文

posted @ 2011-10-02 10:22 More study needed. 阅读(315) 评论(0) 推荐(2) 编辑

导航

书山有径勤为路>>>>>>>>

<<<<<<<<学海无涯苦作舟!