Main.cpp: In function 'int32_t main()':
Main.cpp:41:12: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wformat=]
41 | printf("%u",ans.size());
| ~^ ~~~~~~~~~~
| | |
| | std::vector<int>::size_type {aka long unsigned int}
| unsigned int
| %lu
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];}
| ~~~~~^~~~~~~~~~~~