A. Robbers' watch 题目连接: http://www.codeforces.com/contest/685/problem/A Description Robbers, who attacked the Gerda's cab, are very successful in covering from the kingdom police. To make the goal of catching them even harder, they use their own watc…
题目链接:http://codeforces.com/problemset/problem/686/C 给你n和m,问你有多少对(a, b) 满足0<=a <n 且 0 <=b < m 且a的7进制和n-1的7进制位数相同 且b的7进制和m-1的7进制位数相同,还有a和b的7进制上的每位上的数各不相同. 看懂题目,就很简单了,先判断a和b的7进制位数是否超过7,不超过的话就dfs暴力枚举计算就可以了. //#pragma comment(linker, "/STACK:1…
C. Robbers' watch time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Robbers, who attacked the Gerda's cab, are very successful in covering from the kingdom police. To make the goal of catchi…
题目链接:http://codeforces.com/contest/686/problem/C题目大意:给你两个十进制的数n和m,选一个范围在[0,n)的整数a,选一个范围在[0,m)的整数b,要求a的7进制表示和b的7进制表示中的每一位都不重复.其中,a的7进制位数和n-1的7进制位数相同,b的位数和m-1的位数相同.比如,当n=2,m=3时,a和b的其进制表示的所有集合是:a=0, b=1 a=0, b=2 a=1, b=0a=1, b=2 解法:这套题目可以用dfs做.我们开一个数组f[…
C. Robbers' watch time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Robbers, who attacked the Gerda's cab, are very successful in covering from the kingdom police. To make the goal of catchi…
A http://codeforces.com/contest/685/standings 题意:给你n和m,找出(a,b)的对数,其中a满足要求:0<=a<n,a的7进制的位数和n-1的7进制的位数相同,b满足要求:0<=b<m,b的7进制的位数和m-1的7进制的位数相同,且a和b的7进制下的位上的数都不相同 思路:如果a b的位数和大于7显然会有重复,缩小范围以后,可以根据题意暴力枚举 // #pragma comment(linker, "/STACK:102400…
B. Kay and Snowflake 题目连接: http://www.codeforces.com/contest/685/problem/B Description After the piece of a devilish mirror hit the Kay's eye, he is no longer interested in the beauty of the roses. Now he likes to watch snowflakes. Once upon a time,…
B. Little Robber Girl's Zoo 题目连接: http://www.codeforces.com/contest/686/problem/B Description Little Robber Girl likes to scare animals in her zoo for fun. She decided to arrange the animals in a row in the order of non-decreasing height. However, th…
A. Free Ice Cream 题目连接: http://www.codeforces.com/contest/686/problem/A Description After their adventure with the magic mirror Kay and Gerda have returned home and sometimes give free ice cream to kids in the summer. At the start of the day they hav…
C. Robbers' watch time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Robbers, who attacked the Gerda's cab, are very successful in covering from the kingdom police. To make the goal of catchi…