查看题目 登录后递交 讨论 题解 文件 统计 ID 4145 时间 2000ms 内存 256MiB 难度 (无) 标签 bitmasks dp *2200 递交数 0 已通过 0 上传者 root
Salazar Slytherin's Locket CodeForces - 855E 如果行号影响了复制,请点击代码框左上角的按钮。 Salazar Slytherin's Locket CodeForces - 855E http://www.cnblogs.com/ftae/p/7590187.html 数位dp: http://www.cnblogs.com/xz816111/p/4809913.html http://blog.csdn.net/wust_zzwh/article/details/5210...
Harry came to know from Dumbledore that Salazar Slytherin's locket is a horcrux. This locket was present earlier at 12 Grimmauld Place, the home of Sirius Black's mother. It was stolen from there and is now present in the Ministry of Magic in the office of Dolorous Umbridge, Harry's fo...
Manthan, Codefest 17 E. Salazar Slytherin's Locket 数位DP 原题链接:http://codeforces.com/contest/855/problem/E 题目大意:一个数字在B进制下为魔法数字当且仅当其在B进制下,0到B-1在其数位上均出现偶数次。问从L到R的B进制下魔法数字的数量。(L<R<10^18 , 2<=B<=10) 首先数位DP的框架大多...
[codeforces] Salazar Slytherin’s Locket (数位dp) [codeforces] Salazar Slytherin’s Locket 题目链接 大致题意: 统计区间[l,r]中,在b进制下每种0~b-1的数的个数都出现偶数次的个数,不包含前导零 解题思路: 因为涉及到数字0的计算,所以前导零的判断一定有 然后我们思考,怎么统计0~b-1每一个数字...
Codeforces Round #591 (Div. 2, based on Technocup 2020 Elimination Round 1) 2019-12-23 15:51 − Virtual participate 的,D题不会做,打了1:30就打不动了,过了ABCE。 ##A - CME 题意:? 题解:? ```cpp void test_case() { int n; scanf("%d", &n); if(n == 2) puts("2");...
Harry came to know from Dumbledore that Salazar Slytherin's locket is a horcrux. This locket was present earlier at 12 Grimmauld Place, the home of Sirius Black's mother. It was stolen from there and is now present in the Ministry of Magic in the office of Dolorous Umbridge, Harry's fo...
Salazar Slytherin39;s Locket 题解: 数位DP。 对于不同的进制直接数位DP就好了。 在数位dp中比较基础。 通过状压来xor值,使得表示每个数字出现奇数次/偶数次. 注意的就是 去除 00 0000 这些数的影响。 代码: #include<bits/stdc
Harry came to know from Dumbledore that Salazar Slytherin's locket is a horcrux. This locket was present earlier at 12 Grimmauld Place, the home of Sirius Black's mother. It was stolen from there and is now present in the Ministry of Magic in the office of Dolorous Umbridge, Harry's fo...
855E - Salazar Slytherin's Locket 题意 给出一个区间,问这个区间内有多少个数满足,将这个数转化为某个进制后,所有数的数量都为偶数。 分析 谁能想到 数位DP 的裸题竟然放到了 E , 美滋滋。 考虑用一个二进制数记录每种数出现的次数的奇偶性,很容易用异或去操作。