
处理技巧
weixin_43331783
/p/px5xQRGVPD/
展开
-
水题A. Checking the Calendar CodeForces - 724A B - Batch Sort CodeForces - 724B
A. Checking the Calendar CodeForces - 724A 很简单的一道题两天相差只有30,31,28天。所以对7整出一下。 余数2,3,0.所以把输入星期转换为数字,然后相减对应一下即可。(当前一天为星期天后一天天数大于7所以相减记得去模) 写这个题原因是因为我处理星期转换数字很差参照了别人的代码把这种方式记录一下。 #include <iostream> ...原创 2019-08-08 11:33:14 · 173 阅读 · 0 评论 -
查询是否出现过(取代map查询hash优化)
for(int i=0;i<len1-L+1;i++) { a[cnt++]=get_hash(i,L,hash_1); } sort(a,a+cnt); for(int i=0;i<len2-L+1;i++) { ull tmp=get_hash(i,L,hash_2); int pos=lowe...原创 2019-08-08 21:23:55 · 177 阅读 · 0 评论