摘要:
double a[maxn][maxn],x[maxn];void gauss(){ for1(i,n-1) { int k=i; for2(j,i+1,n)if(fabs(a[j][i])>fabs(a[k][i]))k=j; for2(j,i,n+1)swap(a[i][j],a[k][j... 阅读全文
摘要:
int n,m,a[maxn],f[maxn][20];void rmq(){ for(int i=1;i<=n;i++)f[i][0]=a[i]; for(int i=1;i<=floor(log(n)/log(2));i++) for(int j=1;j<=n-(1<<i)+1;j++) ... 阅读全文