题意:有一个公告是用多个国家的语言播放的。 比如有a,b,c三种语言。 那么这个公告可能是aabbcc,也可以是abc。
每一个语言 代表这个语言的一个单词。 每种语言在公告中的单词数是一样多的,如aabc,a语种 多了一个单词,是不行的。
而且每种语言 的单词都是连续的,而且仅出现一次,如第二个案例中,english非连续得出现了两次,所以这种情况是不行的。
unknown可以 用任意语言替代。如果没有符合要求的情况,输出 Igor is wrong.。 有且有多种情况的话,输出每一种情况的语...
分类:
其他好文 时间:
2015-03-07 21:20:08
阅读次数:
201
题意:有ABCD四个点在圆上,按顺序排列(也就是说B一定在AC之间)。 然后根据输入的四条边。
做法:因为同弦的圆周角相等,所以∠A==∠B。 然后在三角形ADC和三角形BCD中各用一遍余弦定理。可以得到两个方程。未知的只有cos∠A 和 DC,一个二元方程组,化简一下 就可以求出DC了。
余弦定理 a^2=b^2+c^2-2*b*c*cos(∠A);...
分类:
其他好文 时间:
2015-03-07 20:04:57
阅读次数:
148
URAL 1297. Palindrome(后缀数组 求最长回文子串)...
分类:
编程语言 时间:
2015-03-07 20:04:10
阅读次数:
157
题意:输入一个n,计算ans= 1^n+2^n+3^n+4^n ,输出ans末尾几个0。
做法:规律题,刚开始暴力,看了下规律,发现最多末尾只会有2个零。而且有一定规律。所以可以找循环节,n%20。 或者用快速幂,我用快速幂,循环了一遍1到300000,发现确实末尾最多只有两个0,所以。。。...
分类:
其他好文 时间:
2015-03-07 20:02:28
阅读次数:
183
URAL 1298. Knight(DFS啊 )...
分类:
其他好文 时间:
2015-03-07 20:01:10
阅读次数:
291
1585. Penguins
Time limit: 1.0 second
Memory limit: 64 MB
Programmer Denis has been dreaming of visiting Antarctica since his childhood. However, there are no regular flights to Antarctic...
分类:
其他好文 时间:
2015-03-07 17:16:10
阅读次数:
167
1225. Flags
Time limit: 1.0 second
Memory limit: 64 MB
On the Day of the Flag of Russia a shop-owner decided to decorate the show-window of his shop with textile stripes of white, blue an...
分类:
其他好文 时间:
2015-03-07 15:46:37
阅读次数:
139
1581. Teamwork
Time limit: 1.0 second
Memory limit: 64 MB
Vasya and Petya are going to participate in a team olympiad in informatics. They have listened to the stories told by the gurus o...
分类:
其他好文 时间:
2015-03-07 14:16:40
阅读次数:
129
URAL 1290. Sabotage(STL & 模拟啊)...
分类:
其他好文 时间:
2015-03-07 11:38:31
阅读次数:
185
URAL 1295. Crazy Notions(数学啊 & 找规律)...
分类:
其他好文 时间:
2015-03-07 11:38:06
阅读次数:
124