0_0_16345752_30559.cpp:1:50: error: stray '#' in program
<li class="alt"><span><span class="preprocessor">#include <iostream></span><span> </span></span></li><li class=""><span><span class="preprocessor">#include <stdlib.h></span><span> </span></span></li><li class="alt"><span><span class="preprocessor">#include <string.h></span><span> </span></span></li><li class=""><span><span class="preprocessor">#include <algorithm></span><span> </span></span></li><li class="alt"><span><span class="preprocessor">#include <stdio.h></span><span> </span></span></li><li class=""><span> </span></li><li class="alt"><span><span class="keyword">const</span><span> </span><span class="datatypes">int</span><span> Times = 10; </span></span></li><li class=""><span><span class="keyword">const</span><span> </span><span class="datatypes">int</span><span> N = 5500; </span></span></li><li class="alt"><span> </span></li><li class=""><span><span class="keyword">using</span><span> </span><span class="keyword">namespace</span><span> std; </span></span></li><li class="alt"><span><span class="keyword">typedef</span><span> </span><span class="datatypes">long</span><span> </span><span class="datatypes">long</span><span> LL; </span></span></li><li class=""><span> </span></li><li class="alt"><span>LL ct, cnt; </span></li><li class=""><span>LL fac[N], num[N]; </span></li><li class="alt"><span> </span></li><li class=""><span>LL gcd(LL a, LL b) </span></li><li class="alt"><span>{ </span></li><li class=""><span> <span class="keyword">return</span><span> b? gcd(b, a % b) : a; </span></span></li><li class="alt"><span>} </span></li><li class=""><span> </span></li><li class="alt"><span>LL multi(LL a, LL b, LL m) </span></li><li class=""><span>{ </span></li><li class="alt"><span> LL ans = 0; </span></li><li class=""><span> a %= m; </span></li><li class="alt"><span> <span class="keyword">while</span><span>(b) </span></span></li><li class=""><span> { </span></li><li class="alt"><span> <span class="keyword">if</span><span>(b & 1) </span></span></li><li class=""><span> { </span></li><li class="alt"><span> ans = (ans + a) % m; </span></li><li class=""><span> b--; </span></li><li class="alt"><span> } </span></li><li class=""><span> b >>= 1; </span></li><li class="alt"><span> a = (a + a) % m; </span></li><li class=""><span> } </span></li><li class="alt"><span> <span class="keyword">return</span><span> ans; </span></span></li><li class=""><span>} </span></li><li class="alt"><span> </span></li><li class=""><span>LL quick_mod(LL a, LL b, LL m) </span></li><li class="alt"><span>{ </span></li><li class=""><span> LL ans = 1; </span></li><li class="alt"><span> a %= m; </span></li><li class=""><span> <span class="keyword">while</span><span>(b) </span></span></li><li class="alt"><span> { </span></li><li class=""><span> <span class="keyword">if</span><span>(b & 1) </span></span></li><li class="alt"><span> { </span></li><li class=""><span> ans = multi(ans, a, m); </span></li><li class="alt"><span> b--; </span></li><li class=""><span> } </span></li><li class="alt"><span> b >>= 1; </span></li><li class=""><span> a = multi(a, a, m); </span></li><li class="alt"><span> } </span></li><li class=""><span> <span class="keyword">return</span><span> ans; </span></span></li><li class="alt"><span>} </span></li><li class=""><span> </span></li><li class="alt"><span><span class="datatypes">bool</span><span> Miller_Rabin(LL n) </span></span></li><li class=""><span>{ </span></li><li class="alt"><span> <span class="keyword">if</span><span>(n == 2) </span><span class="keyword">return</span><span> </span><span class="keyword">true</span><span>; </span></span></li><li class=""><span> <span class="keyword">if</span><span>(n < 2 || !(n & 1)) </span><span class="keyword">return</span><span> </span><span class="keyword">false</span><span>; </span></span></li><li class="alt"><span> LL m = n - 1; </span></li><li class=""><span> <span class="datatypes">int</span><span> k = 0; </span></span></li><li class="alt"><span> <span class="keyword">while</span><span>((m & 1) == 0) </span></span></li><li class=""><span> { </span></li><li class="alt"><span> k++; </span></li><li class=""><span> m >>= 1; </span></li><li class="alt"><span> } </span></li><li class=""><span> <span class="keyword">for</span><span>(</span><span class="datatypes">int</span><span> i=0; i<Times; i++) </span></span></li><li class="alt"><span> { </span></li><li class=""><span> LL a = rand() % (n - 1) + 1; </span></li><li class="alt"><span> LL x = quick_mod(a, m, n); </span></li><li class=""><span> LL y = 0; </span></li><li class="alt"><span> <span class="keyword">for</span><span>(</span><span class="datatypes">int</span><span> j=0; j<k; j++) </span></span></li><li class=""><span> { </span></li><li class="alt"><span> y = multi(x, x, n); </span></li><li class=""><span> <span class="keyword">if</span><span>(y == 1 && x != 1 && x != n - 1) </span><span class="keyword">return</span><span> </span><span class="keyword">false</span><span>; </span></span></li><li class="alt"><span> x = y; </span></li><li class=""><span> } </span></li><li class="alt"><span> <span class="keyword">if</span><span>(y != 1) </span><span class="keyword">return</span><span> </span><span class="keyword">false</span><span>; </span></span></li><li class=""><span> } </span></li><li class="alt"><span> <span class="keyword">return</span><span> </span><span class="keyword">true</span><span>; </span></span></li><li class=""><span>} </span></li><li class="alt"><span> </span></li><li class=""><span>LL pollard_rho(LL n, LL c) </span></li><li class="alt"><span>{ </span></li><li class=""><span> LL i = 1, k = 2; </span></li><li class="alt"><span> LL x = rand() % (n - 1) + 1; </span></li><li class=""><span> LL y = x; </span></li><li class="alt"><span> <span class="keyword">while</span><span>(</span><span class="keyword">true</span><span>) </span></span></li><li class=""><span> { </span></li><li class="alt"><span> i++; </span></li><li class=""><span> x = (multi(x, x, n) + c) % n; </span></li><li class="alt"><span> LL d = gcd((y - x&
|