
BeastCoder
Kim0403
这个作者很懒,什么都没留下…
展开
-
Astar Round1 1004 Problem D
这道题可以理解为字符串排序后查重。 #include #include #include #include #include #include using namespace std; mapcnt; int main() { cnt.clear(); char nn[45]; int N; cin>>N; while (N--) { scan原创 2016-06-11 17:36:38 · 306 阅读 · 0 评论 -
Astar Round1 1002 Problem B
全1序列这道题,就是斐波那契大数。 用了一个大数模板。 #include #include #include #include using namespace std; string &_string_add_string (const string &a, const string &b, string &res) { int sum_value = 0, add_bit =原创 2016-06-11 17:34:43 · 368 阅读 · 0 评论 -
Astar Round2A 1001 ALL X
全是由数字x组成的m位数可表示为(10m-1)/9*x。 则判断 (10m-1)/9*x%k == c 的真假可转化为判断 (10m-1)*x%(9*k) == 9*c 的真假。 (对于加减乘运算,取模可以移动,对于除法不可行。但此处 10m-1 表示有m个9组成的数, 一定可以整除9,故可将9和k放在一起当模数)。接下来用快速幂就可以了。 比赛时,一直想着用大数模板………原创 2016-06-11 17:42:40 · 371 阅读 · 0 评论