摘要: 记得KPM出的题中有过类似的。。 先求出前缀,然后符合题意的条件的i和j满足a[i]-a[j]==b[i]-b[j]==c[i]-c[j] 等价转换得a[i]-b[i]==a[j]-b[j]&&a[i]-c[i]==a[j]-c[j] 所以a[i]-b[i]和a[i]-c[i]用hash记录就可以了 阅读全文
posted @ 2016-03-08 21:36 onlyRP 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 再写一次毒瘤题,改变代码风格改用了指针,以为会不太适应,事实上不会撒。。 对拍数据要等20分钟才出来= = 1 //#include<bits/stdc++.h> 2 #include<cstdio> 3 #include<cstring> 4 #include<algorithm> 5 #incl 阅读全文
posted @ 2016-03-08 20:45 onlyRP 阅读(193) 评论(0) 推荐(0) 编辑