摘要: 题意:有一只怪兽,在白天攻击一次能损失它pd点血,晚上攻击则损失它pn点血,每次攻击的间隔为t,每天的白天时间与晚上时间分别为t1i, t2i,问N天内最多攻击它多少血。n #include#include#include#include#include#include#include#include#include#include#include#define tree int o,int l,int r#define lson o=t) { for(int i=t,j=m; i>=1; i--,j--) { int s=j%t; ... 阅读全文
posted @ 2013-10-12 21:07 baoff 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 做提前一定要先比较KMP和哈希哪个更简单!!Letsbe a string whose length equalsn. Its characters are numbered from 0 ton - 1,iandjare integers,0 ≤ i #include#include#include#include#include#include#include#include#include#include#include#define tree int o,int l,int r#define lson o>1; if(fa[mid]==hb[i+mid-1... 阅读全文
posted @ 2013-10-12 19:49 baoff 阅读(308) 评论(0) 推荐(0) 编辑