
状压
Aurum_potestas_est
这个作者很懒,什么都没留下…
展开
-
CF100801 hash
给定一个字符串hash,为 ∑i=0len−1str[i]×31len−1−i 求 K个长度不超过 1000的字符串,使得他们的 hash值相等 其中每个 hash值是 32位有符号整数,K≤1000 思路:将字符串看成是31进制,前一位-1,后一位+31,转换成十进制的结果是不变的#include<stdio.h>#include<string.h>using namespace s原创 2017-10-06 19:31:37 · 263 阅读 · 0 评论 -
2017ICPC 南宁网络赛M Frequent Subsets Problem
The frequent subset problem is defined as follows. Suppose UU={1, 2,\ldots…,N} is the universe, and S_{1}S 1 , S_{2}S 2 ,\ldots…,S_{M}S M are MM sets over UU. Given a positive constan原创 2017-09-25 21:20:48 · 407 阅读 · 0 评论