/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'double getdis(std::pair<double, double>, std::pair<double, double>)':
/in/foo.cc:40:7: error: expected unqualified-id before '[' token
  auto [x1,y1]=a;
       ^
/in/foo.cc:41:7: error: expected unqualified-id before '[' token
  auto [x2,y2]=b;
       ^
/in/foo.cc:42:15: error: 'x1' was not declared in this scope
  return hypot(x1-x2,y1-y2);
               ^~
/in/foo.cc:42:18: error: 'x2' was not declared in this scope
  return hypot(x1-x2,y1-y2);
                  ^~
/in/foo.cc:42:24: error: 'y2' was not declared in this scope
  return hypot(x1-x2,y1-y2);
                        ^~
/in/foo.cc: In function 'int main()':
/in/foo.cc:59:8: error: expected unqualified-id before '[' token
   auto [x,y,v]=per[i];
        ^
/in/foo.cc:61:19: error: 'x' was not declared in this scope
    db dis=getdis({x,y},pos[j]);
                   ^
/in/foo.cc:61:21: error: 'y' was not declared in this scope
    db dis=getdis({x,y},pos[j]);
                     ^
/in/foo.cc:61:30: error: could not convert '{<expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::pair<double, double>'
    db dis=getdis({x,y},pos[j]);
                              ^
/in/foo.cc:62:15: error: 'v' was not declared in this scope
    db tim=dis/v;
               ^

信息

递交者
类型
递交
题目
P1212 Way Selection
语言
C++
递交时间
2025-01-04 14:33:49
评测时间
2025-01-04 14:33:49
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes