数据结构
穆晨
这个作者很懒,什么都没留下…
展开
-
03-树2. Tree Traversals Again 自写
03-树2. Tree Traversals Again (25)时间限制 200 ms内存限制 65536 kB代码长度限制 8000 B判题程序 Standard 作者 CHEN, YueAn inorder binary tree traversal can be implemented原创 2015-04-22 17:11:30 · 716 阅读 · 2 评论 -
04-树4. Search in a Binary Search Tree
04-树4. Search in a Binary Search Tree (25)时间限制 100 ms内存限制 65536 kB代码长度限制 8000 B判题程序 Standard 作者 CHEN, YueTo search a key in a binary search tree, we原创 2015-04-25 22:13:22 · 433 阅读 · 0 评论 -
05-树7. File Transfer
We have a network of computers and a list of bi-directional connections. Each of these connections allows a file transfer from one computer to another. Is it possible to send a file from any computer o原创 2015-05-06 00:49:44 · 527 阅读 · 0 评论 -
POJ2503 哈希(字符串编码)
Babelfish Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 37822 Accepted: 16111 DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehe原创 2015-11-30 22:52:04 · 571 阅读 · 0 评论 -
POJ 2202 哈希
Squares Time Limit: 3500MS Memory Limit: 65536K Total Submissions: 18116 Accepted: 6946 DescriptionA square is a 4-sided polygon whose sides have equal length and adjacent sides form 90-原创 2015-11-30 23:15:44 · 358 阅读 · 0 评论 -
POJ 3349 哈希
Snowflake Snow Snowflakes Time Limit: 4000MS Memory Limit: 65536K Total Submissions: 35803 Accepted: 9441 DescriptionYou may have heard that no two snowflakes are alike. Your task is to原创 2015-11-30 22:56:57 · 348 阅读 · 0 评论 -
POJ 3273 二分求最大化最小值
Monthly Expense Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 20086 Accepted: 7916 DescriptionFarmer John is an astounding accounting wizard and has realized he might run ou原创 2016-01-28 16:12:26 · 3877 阅读 · 2 评论 -
POJ 3468 树状数组
题目You have N integers, A1, A2, … , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is to ask for the s原创 2016-02-14 23:37:55 · 311 阅读 · 0 评论 -
POJ 1195 二维树状数组
题目Mobile phones Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 17263 Accepted: 7966 DescriptionSuppose that the fourth generation mobile phone base stations in the Tampere area operate原创 2016-02-14 23:46:26 · 230 阅读 · 0 评论 -
02-线性结构3. Pop Sequence
Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop sequence of t原创 2015-04-22 23:03:47 · 377 阅读 · 0 评论 -
POJ2513 Hash+并查集+欧拉回路
Colored Sticks Time Limit: 5000MS Memory Limit: 128000K Total Submissions: 33480 Accepted: 8787 DescriptionYou are given a bunch of wooden sticks. Each endpoint of each stick is colored with some原创 2015-12-12 17:32:32 · 244 阅读 · 0 评论 -
POJ 3253 哈夫曼树
Fence Repair Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 34676 Accepted: 11167 DescriptionFarmer John wants to repair a small length of the fence around the pasture. He measures the原创 2015-12-12 17:20:36 · 278 阅读 · 0 评论 -
03-树1. List Leaves 经验
Given a tree, you are supposed to list all the leaves in the order of top down, and left to right.Input Specification: Each input file contains one test case. For each case, the first line gives原创 2015-04-21 13:30:01 · 508 阅读 · 0 评论 -
05-树8. Huffman Codes
In 1953, David A. Huffman published his paper “A Method for the Construction of Minimum-Redundancy Codes”, and hence printed his name in the history of computer science. As a professor who gives the fi原创 2015-05-05 12:35:33 · 919 阅读 · 0 评论 -
POJ 2299 分治法求数列逆序对(归并排序)
Ultra-QuickSortTime Limit: 7000MS Memory Limit: 65536K Total Submissions: 50482 Accepted: 18516 DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm process原创 2015-11-24 17:07:36 · 1865 阅读 · 0 评论 -
04-树5. Complete Binary Search Tree
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: •The left subtree of a node contains only nodes with keys less than the node’s key. •The right原创 2015-04-28 21:28:00 · 485 阅读 · 0 评论 -
04-树3. Root of AVL Tree
04-树3. Root of AVL Tree (25)时间限制 100 ms内存限制 65536 kB代码长度限制 8000 B判题程序 Standard 作者 CHEN, YueAn AVL tree is a self-balancing binary search tree. In an原创 2015-04-23 22:32:48 · 450 阅读 · 0 评论 -
05-树6. Path in a Heap
Insert a sequence of given numbers into an initially empty min-heap H. Then for any given index i, you are supposed to print the path from H[i] to the root. Input Specification: Each input file contain原创 2015-04-30 23:42:01 · 529 阅读 · 0 评论 -
POJ 1840 折半哈希
Eqs Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 14634 Accepted: 7181 DescriptionConsider equations having the following form: a1x13+ a2x23+ a3x33+ a4x43+ a5x53=0 The coefficient原创 2015-12-12 16:49:36 · 277 阅读 · 0 评论 -
POJ 3274 哈希
Gold Balanced Lineup Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 13606 Accepted: 3956 DescriptionFarmer John’s N cows (1 ≤ N ≤ 100,000) share many similarities. In fact, FJ has been原创 2015-12-12 17:16:13 · 298 阅读 · 0 评论 -
POJ 1703 并查集
题目Find them, Catch them Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 38704 Accepted: 11915 DescriptionThe police office in Tadu City decides to say ends to the chaos, as launch actio原创 2016-02-15 13:42:08 · 332 阅读 · 0 评论