foo.cc: In function 'int main()':
foo.cc:28:13: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
28 | else c[i]=c[i-1];sv[i]=sv[i-1];}
| ^~~~
foo.cc:28:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
28 | else c[i]=c[i-1];sv[i]=sv[i-1];}
| ^~
foo.cc:11:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
11 | scanf("%d%d%d",&n,&m,&s);
| ~~~~~^~~~~~~~~~~~~~~~~~~
foo.cc:14:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
14 | scanf("%d%d",&w[i],&v[i]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~
foo.cc:22:32: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
22 | for(int i=1;i<=m;i++){scanf("%d%d",&l[i],&r[i]);}
| ~~~~~^~~~~~~~~~~~~~~~~~~~
foo.cc:35:9: warning: 'ans' is used uninitialized in this function [-Wuninitialized]
35 | cout<<ans<<endl;
| ^~~
[Hydro](https://hydro.ac)提供评测服务