Main.cpp: In function 'int32_t main()':
Main.cpp:41:12: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wformat=]
41 | printf("%d",ans.size());
| ~^ ~~~~~~~~~~
| | |
| int std::vector<int>::size_type {aka long unsigned int}
| %ld
Main.cpp:18:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
18 | scanf("%d",&t);
| ~~~~~^~~~~~~~~
Main.cpp:21:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
21 | scanf("%d",&n);
| ~~~~~^~~~~~~~~
Main.cpp:25:31: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
25 | for (int i=1;i<=n;i++){scanf("%d",&a[i]);p[i]=p[i-1]+a[i];}
| ~~~~~^~~~~~~~~~~~