foo.cc: In function 'int main()':
foo.cc:6:12: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for (scanf("%d", &n); n; n--)
~~~~~^~~~~~~~~~
foo.cc:8:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &x);
~~~~~^~~~~~~~~~
foo.cc:15:7: warning: 'num' may be used uninitialized in this function [-Wmaybe-uninitialized]
num++;
~~~^~
[Hydro](https://hydro.ac)提供评测服务