/* CodeForces 834C - The Meaningless Game [ 分析,数学 ] | Codeforces Round #426 (Div. 2) 题意: 一对数字 a,b 能不能被表示为 a = x^2 * y , b = x * y^2 分析: 看出题意就差不多可以直接上了 a^2 = x^4 * y^2 , b = x * y^2 x^3 = a^2/b 同理 y^3 = b^2/a 随便验证一下,开三次方这个,要么预打表,要么pow() 完微调 */ #includ…
Codeforces Round #297 (Div. 2)A. Vitaliy and Pie Time Limit: 2 Sec  Memory Limit: 256 MBSubmit: xxx  Solved: 2xx 题目连接 http://codeforces.com/contest/525/problem/A Description After a hard day Vitaly got very hungry and he wants to eat his favorite pot…
题目链接:Codeforces Round #298 (Div. 2) A. Exam An exam for n students will take place in a long and narrow room, so the students will sit in a line in some order. The teacher suspects that students with adjacent numbers (i and i + 1) always studied side…
最近比赛有点多,可是好像每场比赛都是被虐,单纯磨砺心态的作用.最近讲的内容也有点多,即便是点到为止很浅显的版块,刷了专题之后的状态还是~"咦,能做,可是并没有把握能A啊".每场网络赛,我似乎都没用上新学的东西,能用上新学东西的题我A不了...5555555555555555 这场CF,讲真,打的心态爆炸,首先A题无限WA,赛后看下WA的那组数据是输入有一个999999999的样例,死骗子,说好的数据是1e9呢,哪能有数据是1e10-1,于是用long long,一下子Accept接收不…
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,那就不需要判断肯…
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…
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…
C. The Meaningless Game 题意: 两个人刚刚开始游戏的时候的分数, 都是一分, 然后随机一个人的分数扩大k倍,另一个扩大k的平方倍, 问给你一组最后得分,问能不能通过游戏得到这样一组得分.(谁扩大k倍, 谁扩大k的平方倍,是可以自由选择的, k的值只要是自然数就行了). 思路: 对输入的两个数a, b.求(a*b) 的1/3次方, 如果不能得到,就是不能得的输出“No”.否则在看开方得到的数,能不能同时被a和b整除, 如果可以就输出“Yes”,否则就是“No”. 本题因为A…
C. Vladik and fractions 题目链接 http://codeforces.com/contest/743/problem/C 题面 Vladik and Chloe decided to determine who of them is better at math. Vladik claimed that for any positive integer n he can represent fraction as a sum of three distinct posit…
A. Vladik and flights 题目链接 http://codeforces.com/contest/743/problem/A 题面 Vladik is a competitive programmer. This year he is going to win the International Olympiad in Informatics. But it is not as easy as it sounds: the question Vladik face now is…