B. The Festive Evening time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output It's the end of July – the time when a festive evening is held at Jelly Castle! Guests from all over the kingdom gather he…
[Link]:http://codeforces.com/contest/834/problem/B [Description] [Solution] 模拟水题; 注意一个字母单个出现的时候,结束和开始一起写; [NumberOf WA] [Reviw] [Code] #include <bits/stdc++.h> using namespace std; #define int long long int n,k; char s[(int) 1e6+100]; int rest[500],…
B. The Festive Evening It's the end of July – the time when a festive evening is held at Jelly Castle! Guests from all over the kingdom gather here to discuss new trends in the world of confectionery. Yet some of the things discussed here are not sup…
浅谈从 Lyndon Words 到 Three Squares Lemma By zghtyarecrenj 本文包括:Lyndon Words & Significant Suffixes & Lyndon Array & Runs & Lyndon Tree & Three Squares Lemma. 禁止转载全文,转载部分需要注明出处. 前言 本文正在重写 如果你发现笔者有写错的地方,请联系笔者.(尽量不要用博客园评论,我不会经常看,建议用洛谷私信我或者加…
A. The Useless Toy:http://codeforces.com/contest/834/problem/A 题目意思:给你两个字符,还有一个n,问你旋转n次以后从字符a变成b,是顺时针还是逆时针还是无法确定. 思路: 直接把c=n%4,然后搞出a->b需要顺时针转x下, 那么4-x就是逆时针需要转多少下了,如果顺逆时间是一样的 ,肯定无法判断,如果等于其中一个那该顺时针顺时针,该逆时针逆时针,如果两个时间都不等于c那就是不确定了. 还有一点如果一开始a=b,那就不需要判断肯…
A. The Useless Toy time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Walking through the streets of Marshmallow City, Slastyona have spotted some merchants selling a kind of useless toy which…