摘要:
int a[]={0,2,3,5,7,11,13,17,19,23,29,31,37}; int mul(int x,int y,int mod){ return (__int128)x*y%mod; } int ksm(int x,int y,int mod){ int ans=1; while( 阅读全文
摘要:
#include<bits/stdc++.h> using namespace std; #define N 40005 int n,lim,k; long long ans; int sz[N],sm[N],h[N],ct[N],c[N]; struct AB{ int a,b,c,n; }d[N 阅读全文