URAL 1457. Heating Main】的更多相关文章

space=1&num=1457">1457. Heating Main Time limit: 1.0 second Memory limit: 64 MB Background I like my hometown very much. Those dilapidated buildings rising proudly above the city and streets dug up as far back as the last century inspire me gr…
Central heating Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 614   Accepted: 286 Description Winter has come, but at the Ural State University heating is not turned on yet. There's one little problem: the University is heated only if…
Central heating Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 678   Accepted: 310 Description Winter has come, but at the Ural State University heating is not turned on yet. There's one little problem: the University is heated only if…
Sona Time Limit:5000MS     Memory Limit:65535KB     64bit IO Format: Submit Status Practice NBUT 1457 Appoint description:  Description Sona, Maven of the Strings. Of cause, she can play the zither. Sona can't speak but she can make fancy music. Her…
题目链接 题意:求给定的字符串的最长回文子串 分析:做法是构造一个新的字符串是原字符串+反转后的原字符串(这样方便求两边回文的后缀的最长前缀),即newS = S + '$' + revS,枚举回文串中心位置,RMQ询问LCP = min (height[rank[l]+1] to height[rank[r]]),注意的是RMQ传入参数最好是后缀的位置,因为它们在树上的顺序未知,且左边还要+1. #include <cstdio> #include <algorithm> #in…
2071. Juice Cocktails Time limit: 1.0 secondMemory limit: 64 MB Once n Denchiks come to the bar and each orders a juice cocktail. It could be from 1 to 3 different juices in each cocktail. There are three juices in the bar: apple, banana and pineappl…
2073. Log Files Time limit: 1.0 secondMemory limit: 64 MB Nikolay has decided to become the best programmer in the world! Now he regularly takes part in various programming contests, attentively listens to problems analysis and upsolves problems. But…
2070. Interesting Numbers Time limit: 2.0 secondMemory limit: 64 MB Nikolay and Asya investigate integers together in their spare time. Nikolay thinks an integer is interesting if it is a prime number. However, Asya thinks an integer is interesting i…
2068. Game of Nuts Time limit: 1.0 secondMemory limit: 64 MB The war for Westeros is still in process, manpower and supplies are coming to an end and the winter is as near as never before. The game of thrones is unpredictable so Daenerys and Stannis…
2067. Friends and Berries Time limit: 2.0 secondMemory limit: 64 MB There is a group of n children. According to a proverb, every man to his own taste. So the children value strawberries and raspberries differently. Let’s say that i-th child rates hi…