foo.cc: In function 'int main()':
foo.cc:11:17: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'int*' [-Wformat=]
11 | scanf("%s",a[b[j]]);
| ~^ ~~~~~~~
| | |
| char* int*
| %d
foo.cc:14:18: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'int*' [-Wformat=]
14 | printf("%s\n",a[j]);
| ~^ ~~~~
| | |
| char* int*
| %n
foo.cc:5:15: warning: unused variable 'k' [-Wunused-variable]
5 | int i=0,j,k;
| ^
foo.cc:8:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
8 | scanf("%d",&b[i++]);
| ~~~~~^~~~~~~~~~~~~~
foo.cc:11:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
11 | scanf("%s",a[b[j]]);
| ~~~~~^~~~~~~~~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务