QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#223907#7521. Find the Gapucup-team425#Compile Error//C++206.8kb2023-10-22 20:42:592023-10-22 20:42:59

詳細信息

answer.code: In function ‘int main()’:
answer.code:200:30: error: no matching function for call to ‘ckmax(db&, T)’
  200 |                         ckmax(dist2[type], dot(proj, proj));
      |                         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
answer.code:35:24: note: candidate: ‘template<class T> bool ckmax(T&, const T&)’
   35 | template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }
      |                        ^~~~~
answer.code:35:24: note:   template argument deduction/substitution failed:
answer.code:200:30: note:   deduced conflicting types for parameter ‘const T’ (‘long double’ and ‘T’ {aka ‘double’})
  200 |                         ckmax(dist2[type], dot(proj, proj));
      |                         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~