#include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 1E6 + 10; int x0, x1, a, b, mod; char str[N]; void mul(int a[2][2], int b[2][2], int c[2][2]) { int t[2][2]; memset(t, 0, sizeof t); for(int i = 0; i < 2; i ++) for(int j = 0; j < 2; j ++) for(int k = 0; k &...