zoj3940专题

【ZOJ3940 The 13th Zhejiang Provincial Collegiate Programming ContestE】【脑洞 STL-MAP 复杂度分析 区间运算思想 双指针】M

Modulo Query Time Limit: 2 Seconds      Memory Limit: 65536 KB One day, Peter came across a function which looks like: F(1, X) = X mod A1.F(i, X) = F(i - 1, X) mod Ai, 2 ≤ i ≤ N. Where