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_26239398_22280.cpp: In function 'll dfs(int, int, int)':
0_0_26239398_22280.cpp:26:58: error: invalid initialization of reference of type 'int&' from expression of type 'll {aka long long int}'
  if(o) chkmin(res, dfs(o^1, pos+k, k) - v[pos+k] + v[pos]);
                                                          ^
0_0_26239398_22280.cpp:20:13: note: in passing argument 1 of 'void chkmin(int&, int)'
 inline void chkmin(int &x, int y){ if(y < x) x = y; }
             ^
0_0_26239398_22280.cpp:27:79: error: invalid initialization of reference of type 'int&' from expression of type 'll {aka long long int}'
  if(o && pos + k < n) chkmin(res, dfs(o^1, pos+k+1, k+1) - v[pos+k+1] + v[pos]);
                                                                               ^
0_0_26239398_22280.cpp:20:13: note: in passing argument 1 of 'void chkmin(int&, int)'
 inline void chkmin(int &x, int y){ if(y < x) x = y; }
             ^
0_0_26239398_22280.cpp:28:59: error: invalid initialization of reference of type 'int&' from expression of type 'll {aka long long int}'
  if(!o) chkmax(res, dfs(o^1, pos+k, k) + v[pos+k] - v[pos]);
                                                           ^
0_0_26239398_22280.cpp:19:13: note: in passing argument 1 of 'void chkmax(int&, int)'
 inline void chkmax(int &x, int y){ if(y > x) x = y; }
             ^
0_0_26239398_22280.cpp:29:80: error: invalid initialization of reference of type 'int&' from expression of type 'll {aka long long int}'
  if(!o && pos + k < n) chkmax(res, dfs(o^1, pos+k+1, k+1) + v[pos+k+1] - v[pos]);
                                                                                ^
0_0_26239398_22280.cpp:19:13: note: in passing argument 1 of 'void chkmax(int&, int)'
 inline void chkmax(int &x, int y){ if(y > x) x = y; }
             ^


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-06-21 13:40:20, Gzip enabled