摘要: http://codeforces.com/problemset/problem/85/Dhttp://acm.hdu.edu.cn/showproblem.php?pid=4288其实就是五棵线段树,我把它放在同一个数组里了,这样比较好处理,其中因为没有处理取模时会有负数的情况,最后让它加上一个很大的数才过的。(i+c+100000)%5AC Code 1 #include <cstdio> 2 #include <algorithm> 3 using namespace std; 4 #define lson l,m,rt<<1 5 #define rs 阅读全文