bootfall.cpp: In function 'int main()':
bootfall.cpp:21:12: warning: format '%lld' expects argument of type 'long long int*', but argument 2 has type 'int*' [-Wformat=]
21 | scanf("%lld",&n);
| ~~~^ ~~
| | |
| | int*
| long long int*
| %d
bootfall.cpp:21:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
21 | scanf("%lld",&n);
| ~~~~~^~~~~~~~~~~
bootfall.cpp:23:29: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
23 | for(int i=1;i<=n;i++) scanf("%d",&a[i]), dp |= dp << a[i], sum += a[i];
| ~~~~~^~~~~~~~~~~~
bootfall.cpp:26:32: warning: iteration 250009 invokes undefined behavior [-Waggressive-loop-optimizations]
26 | for(int i=1;i<=N;i++) if(ans[i] == n) num++;
| ~~~~~^
bootfall.cpp:26:15: note: within this loop
26 | for(int i=1;i<=N;i++) if(ans[i] == n) num++;
| ^
bootfall.cpp:28:32: warning: iteration 250009 invokes undefined behavior [-Waggressive-loop-optimizations]
28 | for(int i=1;i<=N;i++) if(ans[i] == n) printf("%d ",i);
| ~~~~~^
bootfall.cpp:28:15: note: within this loop
28 | for(int i=1;i<=N;i++) if(ans[i] == n) printf("%d ",i);
| ^