Problem Description
Tina Town is a friendly place. People there care about each other.
Tina has a ball called zball. Zball is magic. It grows larger every day. On the first day, it becomes 1 tim...
分类:
其他好文 时间:
2015-08-18 12:00:54
阅读次数:
185
Description
相传,在远古时期,位于西方大陆的 Magic Land 上,人们已经掌握了用魔
法矿石炼制法杖的技术。那时人们就认识到,一个法杖的法力取决于使用的矿石。
一般地,矿石越多则法力越强,但物极必反:有时,人们为了获取更强的法力而
使用了很多矿石,却在炼制过程中发现魔法矿石全部消失了,从而无法炼制
出法杖,这个现象被称为“魔法抵消” 。特别地,如果在炼制过程中使...
分类:
其他好文 时间:
2015-08-17 10:10:41
阅读次数:
101
Problem DescriptionTina Town is a friendly place. People there care about each other.Tina has a ball called zball. Zball is magic. It grows larger eve...
分类:
其他好文 时间:
2015-08-16 12:06:10
阅读次数:
110
原文链接 http://www.ituring.com.cn/article/131439本文翻译自:Scala snippets 2: List symbol magic fairjm@ituringScala的每一个操作符都可以是函数,所以重载操作符(实际上不是真正的重载操作符,毕竟操作符都已经...
分类:
其他好文 时间:
2015-08-16 00:24:34
阅读次数:
227
题目链接:Wireless Password
解析:给 m 个单词构成的集合,统计所有长度为 n 的串中,包含至少 k 个单词的方案数。
AC自动机 + 状态压缩DP。
DP[i][j][k]:长度为i的字符串匹配到状态j且包含k个magic word的可能字符串个数。
AC代码:
#include
#include
#include
#include
#...
分类:
其他好文 时间:
2015-08-15 16:34:51
阅读次数:
119
题意:
给出n个珠子的项链和m种珠子;
珠子之间有k对关系,这些珠子不能相邻;
无法通过旋转变成相同的项链视为本质不同;
求本质不同的项链个数,答案对9973取模;
n
题解:
这显然是一个置换计数的问题;
上burnside引理还是选择poi?
上burnside引理,因为poi定理对颜色的限制要很宽泛才行!
先考虑一种置换姿势,旋转x个珠子;
那么就将项链分成了g...
分类:
其他好文 时间:
2015-08-12 19:39:24
阅读次数:
124
1037. Magic Coupon (25)The magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that when you use th...
分类:
其他好文 时间:
2015-08-11 15:41:55
阅读次数:
105
看到yii2.0源码中大量使用 /** * PHP getter magic method. * This method is overridden so that attributes and related objects can be accessed like prop...
分类:
其他好文 时间:
2015-08-11 15:32:35
阅读次数:
102
题目链接:
https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=600&problem=1398&mosmsg=Submission+received+with+ID+14106648题意:
m条路,每条路上必须维持速度v,现在有一辆车,启动能量和结束能量...
分类:
其他好文 时间:
2015-08-10 22:11:45
阅读次数:
101
1.题目大意是,给你一个1000位的数,要你删掉m个为,求结果最小数。
思路:在n个位里面删除m个位,也就是找出n-m个位组成最小数
所以在区间 [0, m]里面找最小的数,对应的下标标号i
接着找区间 [i+1,m++]里面的最小数,对于下标为ii
接着找区间 [ii+1,m++]里面的最小数……
这样就会找n-m个数了。区间这样安排的目的是为了保证取出来的数的顺序...
分类:
其他好文 时间:
2015-08-07 00:23:57
阅读次数:
114