Strange Way to Express Integers Time Limit: 1000MS Memory Limit: 131072K Total Submissions: 17877 Accepted: 6021 Description Elina is reading a book written by Rujia Liu, which introduces a strange way to express non-negative integers. The way is…
中国剩余定理就是同余方程组除数为质数的特殊情况 我直接用同余方程组解了. 记得exgcd后x要更新 还有先更新b1再更新m1,顺序不能错!!(不然会影响到b1的更新) #include<cstdio> #include<cctype> #define REP(i, a, b) for(int i = (a); i < (b); i++) #define _for(i, a, b) for(int i = (a); i <= (b); i++) using namespa…