UVA
文章平均质量分 67
SindarDawn
QZOIer,FTCer,UESTC ACMer,梦想成为大神的Yuta
展开
-
UVa10817 Headmaster's headache[状压DP]
最后再跟自己强调一次,Think twice,code once. Headmaster’s Headache The headmaster of Spring Field School is consider- ing employing some new teachers for certain subjects. There are a number of teach- ers原创 2016-11-03 11:42:32 · 582 阅读 · 0 评论 -
UVa11468 Substring[AC自动机]
Given a set of pattern strings, and a text, you have to nd, if any of the pattern is a substring of the text. If any of the pattern string can be found in text, then print yes', otherwiseno’ (without原创 2016-10-12 09:28:06 · 627 阅读 · 0 评论 -
UVa11732 Strcmp,Anyone?[Trie树]
题意:给定判断方式和字符串,输出字符串两两比较的次数; 分析:如果使用正常的字典树,空间复杂度为4000*1000*26,果断爆,但我静态数组没有爆反而RE了,不知道为什么,可能UVa没有MLE?等会试一下;然后还会超时,因为每个节点都要枚举,是4000*1000*26*26,,不过机智一点应该不会超时?就每次insert顺便求了。所以,采用树的压缩算法(左孩子右兄弟)。 第一次写多叉转原创 2016-10-11 14:07:13 · 407 阅读 · 0 评论 -
UVa11235 Frequent values[RMQ]
You are given a sequence of n integers a1; a2; : : : ; an in non-decreasing order. In addition to that, you are given several queries consisting of indices i and j (1 i j n). For each query, dete原创 2016-10-13 07:39:58 · 451 阅读 · 0 评论 -
UVa11019 Matrix Matcher 留坑[AC自动机]
声明:此题没写,只理解了一下思路,坑留在这里什么时候复习再做。 Given an N M matrix, your task is to nd the number of occurences of an X Y pattern. Input The rst line contains a single integer t (t 15), the number of test原创 2016-10-12 09:54:49 · 416 阅读 · 0 评论 -
UVa1218 Perfect service[树规]
A network is composed of N computers connected by N - 1 communication links such that any two computers can be communicated via a unique route. Two computers are said to be adjacent if there is a commu原创 2016-11-01 18:53:03 · 460 阅读 · 0 评论 -
UVa1625 Color length[DP][差分]
Cars painted in different colors are moving in a row on the road as shown in Figure 1. The color of each car is represented by a single character and the distance of two adjacent cars is assumed to be原创 2016-11-02 20:05:05 · 405 阅读 · 0 评论