QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#552930#9220. Bus Analysisucup-team3684#Compile Error//C++143.3kb2024-09-08 04:07:532024-09-08 04:07:54

詳細信息

answer.code: In function ‘void solve()’:
answer.code:106:27: error: conversion from ‘Point<long long int>’ to non-scalar type ‘Point<double>’ requested
  106 |     Point<double> p = itr.second;
      |                       ~~~~^~~~~~
answer.code:120:57: error: invalid initialization of reference of type ‘const Point<double>&’ from expression of type ‘Point<long long int>’
  120 |         if(delta < -1e-8 || (delta == 0 && abs(lineDist(s1,e1,s2)) > 1e-8 && abs(lineDist(s2,e2,s1)) > 1e-8)) {
      |                                                         ^~
answer.code:68:38: note: in passing argument 1 of ‘double lineDist(const Point<double>&, const Point<double>&, const Point<double>&)’
   68 | double lineDist(const Point<double>& a, const Point<double>& b, const Point<double>& p) {
      |                 ~~~~~~~~~~~~~~~~~~~~~^
answer.code:120:91: error: invalid initialization of reference of type ‘const Point<double>&’ from expression of type ‘Point<long long int>’
  120 |         if(delta < -1e-8 || (delta == 0 && abs(lineDist(s1,e1,s2)) > 1e-8 && abs(lineDist(s2,e2,s1)) > 1e-8)) {
      |                                                                                           ^~
answer.code:68:38: note: in passing argument 1 of ‘double lineDist(const Point<double>&, const Point<double>&, const Point<double>&)’
   68 | double lineDist(const Point<double>& a, const Point<double>& b, const Point<double>& p) {
      |                 ~~~~~~~~~~~~~~~~~~~~~^