中国剩余定理
文章平均质量分 74
FainTwinkle
这么好的故事,你可别演砸了。
展开
-
hduLucky7(容斥+中国剩余定理)
给你一个区间,问你在这个区间内 不满足模m[i]等于a[i]的 并且能被7整除的个数有几个 这题因为n只有15 所以直接状态压缩一下,把状态容斥一下就好了。注意乘法要用快速乘法,要不然会爆longlong AC代码: #include #include #include #include #include using namespace std; typedef __int64 ll; co原创 2016-08-03 13:30:06 · 417 阅读 · 0 评论 -
hdu1006Biorhythms(中国剩余定理)
Description Some people believe that there are three cycles in a person's life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles, and the原创 2016-08-08 19:56:52 · 2973 阅读 · 0 评论 -
poj2891Strange Way to Express Integers(中国剩余定理 不互斥)
Description Elina is reading a book written by Rujia Liu, which introduces a strange way to express non-negative integers. The way is described as following: Choose k different positive intege原创 2016-08-08 21:24:28 · 996 阅读 · 0 评论