Main.cpp: In function 'void solve()':
Main.cpp:17:18: warning: overflow in conversion from 'int' to 'short int' changes value from '100001' to '-31071' [-Woverflow]
17 | dp[0] = maxv + 1;
| ~~~~~^~~
Main.cpp:11:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
11 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
Main.cpp:13:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
13 | scanf("%d", &A[i]);
| ~~~~~^~~~~~~~~~~~~
Main.cpp: In function 'int main()':
Main.cpp:37:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
37 | scanf("%d", &T);
| ~~~~~^~~~~~~~~~