题目链接:http://codeforces.com/contest/734/problem/C C. Anton and Making Potions time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Anton is playing a very interesting computer game, but now he i…
A. Anton and Danik time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Anton likes to play chess, and so does his friend Danik. Once they have played n games in a row. For each game it's known…
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…
http://codeforces.com/contest/834 A. The Useless Toy 题意: <,>,^,v这4个箭头符号,每一个都可以通过其他及其本身逆时针或者顺时针旋转得到. 现在给出起始符号和结束符号,以及旋转的次数,判断是逆时针还是顺时针或者是无法判断. 思路: 可以知道4为一个周期,所以就把次数对4取余数,看一个周期之内的操作就可以了,分别模拟顺时针和逆时针的操作,如果都可以到达或者都不可以到达,那么它们就是不可识别的行为,其它就可以判断顺时针或者逆时针了. 代码…
D. Diverse Garland time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You have a garland consisting of nn lamps. Each lamp is colored red, green or blue. The color of the ii-th lamp is sisi ('…