vudu.cpp: In function 'int update(int)':
vudu.cpp:15:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
vudu.cpp: In function 'int main()':
vudu.cpp:21:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &N);
~~~~~^~~~~~~~~~
vudu.cpp:22:38: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i = 1; i <= N; i++) scanf("%lld", ar + i);
~~~~~^~~~~~~~~~~~~~~~
vudu.cpp:24:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &P);
~~~~~^~~~~~~~~~