foo.cc: In function 'int main()':
foo.cc:20:9: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long int*' [-Wformat=]
20 | scanf("%d%d",&n,&c);
| ~^ ~~
| | |
| int* long int*
| %ld
foo.cc:20:11: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long int*' [-Wformat=]
20 | scanf("%d%d",&n,&c);
| ~^ ~~
| | |
| int* long int*
| %ld
foo.cc:21:31: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long int*' [-Wformat=]
21 | for (int i=1;i<n;i++) scanf("%d",&ans[i]);
| ~^ ~~~~~~~
| | |
| | long int*
| int*
| %ld
foo.cc:32:8: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
32 | if (i>c&&f!=ans[i]||f%i!=ans[i]) //优化三
| ~~~^~~~~~~~~~~
foo.cc:41:10: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
41 | printf("%d %d %d\n",x,a,b);
| ~^ ~
| | |
| int long int
| %ld
foo.cc:41:13: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
41 | printf("%d %d %d\n",x,a,b);
| ~^ ~
| | |
| int long int
| %ld
foo.cc:41:16: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat=]
41 | printf("%d %d %d\n",x,a,b);
| ~^ ~
| | |
| int long int
| %ld
foo.cc:20:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
20 | scanf("%d%d",&n,&c);
| ~~~~~^~~~~~~~~~~~~~
foo.cc:21:28: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
21 | for (int i=1;i<n;i++) scanf("%d",&ans[i]);
| ~~~~~^~~~~~~~~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务