/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void Solve()':
foo.cpp:5:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
 #define MIN(a,b)((a) > (b) ? (b) : (a))
                          ^
foo.cpp:20:8: note: in expansion of macro 'MIN'
 r[v] = MIN(r[v] , cost) ;
        ^
foo.cpp:5:38: error: operands to ?: have different types 'int' and 'int*'
 #define MIN(a,b)((a) > (b) ? (b) : (a))
                                      ^
foo.cpp:20:8: note: in expansion of macro 'MIN'
 r[v] = MIN(r[v] , cost) ;
        ^
foo.cpp:5:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
 #define MIN(a,b)((a) > (b) ? (b) : (a))
                          ^
foo.cpp:21:8: note: in expansion of macro 'MIN'
 r[v] = MIN(r[v] , cost) ;
        ^
foo.cpp:5:38: error: operands to ?: have different types 'int' and 'int*'
 #define MIN(a,b)((a) > (b) ? (b) : (a))
                                      ^
foo.cpp:21:8: note: in expansion of macro 'MIN'
 r[v] = MIN(r[v] , cost) ;
        ^

信息

递交者
类型
递交
题目
P1046 观光旅游
语言
C++
递交时间
2015-03-09 21:50:32
评测时间
2015-03-09 21:50:37
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes