foo.cc: In function 'int main()':
foo.cc:11:56: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
11 | for(j=1;j<=n;j++)if(e[j]==p&&a[j].c>0)for(i=1;i<=n;i++)if(e[i]==p+1&&b[j][i])
| ^~
foo.cc:12:24: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
12 | a[i].c+=w[j][i]*a[j].c;p=0;for(i=1;i<=n;i++)if(e[i]==k&&a[i].c>0){p=1;
| ^
foo.cc:8:27: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
8 | int main(){int p,i,j;scanf("%d%d",&n,&p);x=n;for(i=1;i<=n;i++){
| ~~~~~^~~~~~~~~~~~~~
foo.cc:9:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
9 | scanf("%d%d",&a[i].c,&a[i].u);if(!a[i].c)a[i].c=-a[i].u;}while(p--){
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:10:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
10 | scanf("%d%d",&i,&j);scanf("%d",&w[i][j]);b[i][j]=1;r[j]++;}work();for(p=1;p<k;p++)
| ~~~~~^~~~~~~~~~~~~~
foo.cc:10:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
10 | scanf("%d%d",&i,&j);scanf("%d",&w[i][j]);b[i][j]=1;r[j]++;}work();for(p=1;p<k;p++)
| ~~~~~^~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务