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_33794402_31271.cpp: In function 'int count(int)':
0_0_33794402_31271.cpp:7:21: error: expected ';' before numeric constant
         n = n & 1   3*n + 1: n / 2;
                     ^
0_0_33794402_31271.cpp: In function 'int findmax(int, int)':
0_0_33794402_31271.cpp:2:33: error: expression cannot be used as a function
 #define max(a, b) ((a) > (b)  (a): (b))
                                 ^
0_0_33794402_31271.cpp:15:15: note: in expansion of macro 'max'
         ans = max(ans, count(n));
               ^
0_0_33794402_31271.cpp:2:34: error: expected ')' before ':' token
 #define max(a, b) ((a) > (b)  (a): (b))
                                  ^
0_0_33794402_31271.cpp:15:15: note: in expansion of macro 'max'
         ans = max(ans, count(n));
               ^
0_0_33794402_31271.cpp: In function 'int main()':
0_0_33794402_31271.cpp:3:33: error: 'b' cannot be used as a function
 #define min(a, b) ((a) < (b)  (a): (b))
                                 ^
0_0_33794402_31271.cpp:22:44: note: in expansion of macro 'min'
         printf("%d %d %d\n", a, b, findmax(min(a, b), max(a, b)));
                                            ^
0_0_33794402_31271.cpp:3:34: error: expected ')' before ':' token
 #define min(a, b) ((a) < (b)  (a): (b))
                                  ^
0_0_33794402_31271.cpp:22:44: note: in expansion of macro 'min'
         printf("%d %d %d\n", a, b, findmax(min(a, b), max(a, b)));
                                            ^


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-17 12:36:58, Gzip enabled