F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_38766423_1500.cpp: In function 'double distance_point_to_segment(Point&, Point&, Point&)':
0_0_38766423_1500.cpp:46:17: error: cannot bind non-const lvalue reference of type 'Point&' to an rvalue of type 'Point'
   46 |         if(dot(A-B,BP)<=0)return len(BP);//|BP|
      |                ~^~
0_0_38766423_1500.cpp:32:19: note:   initializing argument 1 of 'double dot(Point&, Point&)'
   32 | double dot(Point& A,Point& B){return A.x*B.x+A.y*B.y;}//µã³Ë|OA||OB|cos<OA,OB>
      |            ~~~~~~~^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-29 19:05:17, Gzip enabled