/ Vijos /

记录详情

Compile Error

foo.cpp:5:39: error: '>>' should be '> >' within a nested template argument list
 priority_queue<deque<int>, greater<int>> numbers;
                                       ^
foo.cpp:5:39: error: no type named 'value_type' in 'struct std::greater<int>'
foo.cpp:5:39: error: template argument 3 is invalid
foo.cpp:5:49: error: invalid type in declaration before ';' token
 priority_queue<deque<int>, greater<int>> numbers;
                                                 ^
foo.cpp: In function 'int main()':
foo.cpp:14:11: error: request for member 'push_back' in 'numbers', which is of non-class type 'int'
   numbers.push_back(num);
           ^
foo.cpp:17:15: error: request for member 'empty' in 'numbers', which is of non-class type 'int'
  if (!numbers.empty())
               ^
foo.cpp:22:13: error: invalid types 'int[int]' for array subscript
    numbers[i] += numbers[i - 1];
             ^
foo.cpp:22:31: error: invalid types 'int[int]' for array subscript
    numbers[i] += numbers[i - 1];
                               ^
foo.cpp:23:23: error: invalid types 'int[int]' for array subscript
    result += numbers[i];
                       ^

信息

递交者
类型
递交
题目
P1097 合并果子
语言
C++
递交时间
2016-05-01 19:56:50
评测时间
2016-05-01 19:56:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes