摘要:
题意 给出$x0,x1,a,b$, $x_i = a\cdot x_{i 1} + b\cdot x_{i 2}$,问$x_n取模mod$ 题解 用十进制快速幂,二进制快速幂是每到下一位就把a平方,十进制快速幂就是每到下一位就把a变成$a^{10}$,乘10次方的过程再用二进制快速幂优化,总体复杂度 阅读全文
摘要:
题目链接 "Snowy Smile" Problem Description There are n pirate chests buried in Byteland, labeled by 1,2,…,n. The i th chest's location is (xi,yi), and its 阅读全文