/ Vijos /

记录详情

Compile Error

/in/foo.cc:20:51: error: macro "square" passed 2 arguments, but takes just 1
   20 |         return sqrt(square(loc1.first-loc2.first,2)+square(loc1.second-loc2.second));
      |                                                   ^
/in/foo.cc:10: note: macro "square" defined here
   10 | #define square(i) (i)*(i)
      | 
/in/foo.cc: In function 'double dist(int, int)':
/in/foo.cc:20:21: error: 'square' was not declared in this scope
   20 |         return sqrt(square(loc1.first-loc2.first,2)+square(loc1.second-loc2.second));
      |                     ^~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:57:22: error: 'iomanip' has not been declared
   57 |         cout<<fixed<<iomanip::setprecision(2)<<floor(res*100.0+0.5)/100.0<<endl;
      |                      ^~~~~~~

信息

递交者
类型
自测
题目
P1014 旅行商简化版
语言
C++
递交时间
2025-03-31 06:30:44
评测时间
2025-03-31 06:30:44
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes