摘要:
Question:had known a,b,c;ask min x;to made a^x=b(mod c);think:make m=ceil(sqrt(c));make x=i*m-j;so a^(i*m-j)=b(mod c)so a^(i*m)/a^j=b(mod c)so a^(i*m) 阅读全文
摘要:
1 #include 2 #include 3 #include 4 5 using namespace std; 6 const int N=1000; 7 8 int a[N]; 9 int sum[N]; 10 int belong[N]; 11 int size[N] 12 int add[N]; 13 14 15 int K_ask(int l,int r) ... 阅读全文