http://codeforces.com/contest/948/problem/A A. Protect Sheep Bob is a farmer. He has a large pasture with many sheep. Recently, he has lost some of them due to wolf attacks. He thus decided to place some shepherd dogs in such a way that all his she…
题: OvO http://codeforces.com/contest/947/problem/D 923D 947D 948E 解: 记要改变的串为 P1 ,记目标串为 P2 由变化规则可得: 1. B -> AC -> AAB -> AAAC -> C ( 即 B -> C -> B ) 2. AB -> AAC -> AAAB -> B (即 AB -> B ) 3. B -> AC -> AB ( 即 B -> AB…
A. Protect Sheep time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Bob is a farmer. He has a large pasture with many sheep. Recently, he has lost some of them due to wolf attacks. He thus dec…