izlet.cpp: In function 'void solve(int, int, int, int)':
izlet.cpp:19:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=1; i<S.size(); i++) solve(S[i-1], S[i] - 1, C[S[i-1]], -d);
~^~~~~~~~~
izlet.cpp: In function 'int main()':
izlet.cpp:23:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int sub; scanf("%d",&sub);
~~~~~^~~~~~~~~~~
izlet.cpp:24:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int N; scanf("%d",&N);
~~~~~^~~~~~~~~
izlet.cpp:27:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&A[i][j]);
~~~~~^~~~~~~~~~~~~~~