+ 数据结构
文章平均质量分 75
codekun
这个作者很懒,什么都没留下…
展开
-
UVA - 712 S-Trees
S-Trees A Strange Tree (S-tree) over the variable set is a binary tree representing a Boolean function . Each path of the S-tree begins at the root node and consists of n+1 nodes. Eac原创 2014-12-11 00:41:51 · 430 阅读 · 0 评论 -
UVA - 11988 Broken Keyboard (a.k.a. Beiju Text)
Problem BBroken Keyboard (a.k.a. Beiju Text)You're typing a long text with a broken keyboard. Well it's not so badly broken. The only problem with the keyboard is that sometimes the "home" key原创 2014-12-03 08:54:25 · 653 阅读 · 0 评论 -
UVA - 673 Parentheses Balance
Parentheses Balance You are given a string consisting of parentheses () and []. A string of this type is said to be correct:(a)if it is the empty string(b)if A and B are correct, AB is原创 2014-12-10 23:47:36 · 393 阅读 · 0 评论 -
UVA - 536 Tree Recovery
Tree Recovery Little Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital letters in the nodes.This is a原创 2014-12-11 08:23:18 · 430 阅读 · 0 评论 -
UVa 1354 - Mobile Computing <枚举+二叉树>
There is a mysterious planet called Yaen, whose space is 2-dimensional. There are many beautiful stones on the planet, and the Yaen people love to collect them. They bring the stones back home and mak原创 2015-01-29 16:03:49 · 1308 阅读 · 0 评论 -
UVA - 12100 Printer Queue
因为刚开始题目理解错了,误认为刚开始取出的任务是需要打印的任务,结果用不同的方法重写了N边都是WA,悲剧啊后来好好看题看,其实很简单。。。重写后一边AC#include using namespace std;int main(){ int T; cin >> T; while(T--) { int n, site;原创 2014-11-29 20:28:38 · 544 阅读 · 0 评论 -
UVA - 514 Rails
Rails There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time.原创 2014-12-03 08:17:53 · 1053 阅读 · 0 评论 -
UVa 12166 - Equilibrium Mobile <二叉树+DFS>
A mobile is a type of kinetic sculpture constructed to take advantage of the principle of equilibrium. It consists of a number of rods, from which weighted objects or further rods hang. The objects ha原创 2015-01-28 00:14:12 · 2541 阅读 · 0 评论 -
UVa 12333 - Revenge of Fibonacci <大数 字典树>
做这道题横跨了四个月,经历了各种超时和WA,没用字典树之前还用纯ANSI C写了一遍还是超时,今天拿出来,又找了一遍错误还是没发现哪里的事。最后让学长瑾神帮我看了下,原来是题目要求的100000内的斐波那契数,写成了102400内,本来想多算几个总有好处,但这恰恰违反了题意啊,最后改了这一个地方终于AC了。原创 2015-02-05 20:20:51 · 813 阅读 · 0 评论 -
UVA - 12504 Updating a Dictionary
Updating a Dictionary In this problem, a dictionary is collection of key-value pairs, where keys are lower-case letters, and values are non-negative integers. Given an old dictionary and原创 2014-12-09 23:33:05 · 621 阅读 · 0 评论 -
UVA - 210 - Concurrency Simulator <双端队列>
Concurrency Simulator Programs executed concurrently on a uniprocessor system appear to be executed at the same time, but in reality the single CPU alternates between the programs, execu原创 2015-01-26 21:49:54 · 1157 阅读 · 0 评论 -
UVa 1218 Perfect Service [DFS+DP]
题意:给定一个树形的机器结构,安装服务器,每台服务器恰好跟一台服务器相邻,问最少装几台服务器。首先DFS把树建立起来,然后动规求解,注意设置无穷大inf后累加要防止超int范围。#define _CRT_SECURE_NO_WARNINGS#include #include #include #include #include #include #include using原创 2015-04-14 11:11:34 · 578 阅读 · 0 评论