Изменения
Нет описания правки
int cursuma = 0, cursumb = 0, curpos = start, deg = (1 << (k - 1));
while (curpos < start + k and curpos < n) {
cursuma = cursuma += a[i][curpos] * deg; cursumb = cursumb += b[curpos][i] * deg; deg /= deg div 2; curpos = curpos++1;
}
anew[i][start div k](cursuma); bnew[start div k][i](cursumb);
start = start + k;
}