mate.cpp: In function 'int main()':
mate.cpp:26:23: warning: array subscript has type 'char' [-Wchar-subscripts]
ret[A[i+1]]++;
^
mate.cpp:28:30: warning: array subscript has type 'char' [-Wchar-subscripts]
ans[len][A[i]][j] = (1ll * c[i][len-2] * ret[j] + ans[len][A[i]][j]) % M;
^
mate.cpp:28:80: warning: array subscript has type 'char' [-Wchar-subscripts]
ans[len][A[i]][j] = (1ll * c[i][len-2] * ret[j] + ans[len][A[i]][j]) % M;
^
mate.cpp:16:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s", A), n = strlen(A);
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
mate.cpp:31:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &m);
~~~~~^~~~~~~~~~
mate.cpp:33:21: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int d; scanf("%d %s", &d, A);
~~~~~^~~~~~~~~~~~~~~~