/ Vijos /

记录详情

Compile Error

foo.cc: In function 'double minimum_cost_flow(int, int)':
foo.cc:93:9: error: request for member 'v' in 'p', which is of pointer type 'node*' (maybe you meant to use '->' ?)
   93 | if ((p).v>0&&dist[u](*p).c>dist[(*p).t]){
      |         ^
foo.cc:93:24: error: expression cannot be used as a function
   93 | if ((p).v>0&&dist[u](*p).c>dist[(*p).t]){
      |                        ^
foo.cc:94:10: error: request for member 't' in 'p', which is of pointer type 'node*' (maybe you meant to use '->' ?)
   94 | dist[(p).t]=dist[u](*p).c;
      |          ^
foo.cc:94:23: error: expression cannot be used as a function
   94 | dist[(p).t]=dist[u](*p).c;
      |                       ^
foo.cc:101:7: error: request for member 'next' in 'p', which is of pointer type 'node*' (maybe you meant to use '->' ?)
  101 | p=(p).next;
      |       ^~~~
foo.cc: In function 'int main()':
foo.cc:144:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  144 | scanf("%d%d",&n,&k);
      | ~~~~~^~~~~~~~~~~~~~
foo.cc:152:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  152 | scanf("%lf",&as[i]);
      | ~~~~~^~~~~~~~~~~~~~
foo.cc:155:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  155 | scanf("%d",&am[i]);
      | ~~~~~^~~~~~~~~~~~~
foo.cc:162:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  162 | scanf("%d",&x);
      | ~~~~~^~~~~~~~~
foo.cc:170:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  170 | scanf("%d%d",&x,&y);
      | ~~~~~^~~~~~~~~~~~~~
foo.cc:172:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  172 | scanf("%lf%d",&s,&m);
      | ~~~~~^~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1621 终极情报网
语言
C++
递交时间
2022-01-08 20:21:23
评测时间
2022-01-08 20:21:23
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes