baloni.cpp: In function 'int main()':
baloni.cpp:29:40: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'class std::vector<int>' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
29 | int ans=0;memset(prv, 0, sizeof prv);
| ^
In file included from /usr/include/c++/10/vector:67,
from /usr/include/c++/10/queue:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
from baloni.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:389:11: note: 'class std::vector<int>' declared here
389 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
baloni.cpp:31:13: warning: unused variable 'j' [-Wunused-variable]
31 | for(int j, i=n;i>0;i--) {
| ^
baloni.cpp:28:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
28 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
baloni.cpp:30:32: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
30 | for(int i=1;i<=n;i++) scanf("%d", &a[i]);
| ~~~~~^~~~~~~~~~~~~