brunhilda.cpp: In function 'int main()':
brunhilda.cpp:21:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &n , &q ) ;
~~~~~^~~~~~~~~~~~~~~~~~~
brunhilda.cpp:22:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
lp(i,0,n) scanf("%d" , &prime[i] ) ;
~~~~~^~~~~~~~~~~~~~~~~~~
brunhilda.cpp:45:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &a ) ;
~~~~~^~~~~~~~~~~
brunhilda.cpp:38:15: warning: iteration 10000004 invokes undefined behavior [-Waggressive-loop-optimizations]
dp[i] = min( dp[i-myMod[i]] + 1 , dp[i] ) ;
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
brunhilda.cpp:34:23: note: within this loop
for(int i = 1 ; i <= MAX ; i++ )
~~^~~~~~