foo.cc: In function 'int main()':
foo.cc:120:42: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
120 | if(ratio<min_ratio || ratio==min_ratio && h[i]>max_h){
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
foo.cc:105:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
105 | scanf("%d",&n);
| ~~~~~^~~~~~~~~
foo.cc:106:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
106 | for(int i=1;i<=n;++i) scanf("%d",&h[i]);
| ~~~~~^~~~~~~~~~~~
foo.cc:113:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
113 | scanf("%d",&x);
| ~~~~~^~~~~~~~~
foo.cc:130:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
130 | scanf("%d",&m);
| ~~~~~^~~~~~~~~
foo.cc:132:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
132 | scanf("%d%d",&p,&x);
| ~~~~~^~~~~~~~~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务