0_0_33297510_4606.cpp:5:21: error: 's' does not name a type
using namespace std;s
^
0_0_33297510_4606.cpp:13:32: error: 'cmp' was not declared in this scope
priority_queue<int,vector<int>,cmp>q;//从大到小队列
^
0_0_33297510_4606.cpp:13:35: error: template argument 3 is invalid
priority_queue<int,vector<int>,cmp>q;//从大到小队列
^
0_0_33297510_4606.cpp:13:37: error: invalid type in declaration before ';' token
priority_queue<int,vector<int>,cmp>q;//从大到小队列
^
0_0_33297510_4606.cpp: In function 'int main()':
0_0_33297510_4606.cpp:25:18: error: request for member 'empty' in 'q', which is of non-class type 'int'
while(!q.empty())
^
0_0_33297510_4606.cpp:26:8: error: request for member 'pop' in 'q', which is of non-class type 'int'
q.pop();//清空
^
0_0_33297510_4606.cpp:37:8: error: request for member 'push' in 'q', which is of non-class type 'int'
q.push(B);//如果cake在当前位置的右边放入优先队列
^
0_0_33297510_4606.cpp:43:24: error: request for member 'empty' in 'q', which is of non-class type 'int'
if( !q.empty() && !q2.empty() )
^
0_0_33297510_4606.cpp:45:35: error: request for member 'top' in 'q', which is of non-class type 'int'
int temp1 = q.top();
^
0_0_33297510_4606.cpp:50:34: error: request for member 'top' in 'q', which is of non-class type 'int'
ans += q.top() - x;//记录距离
^
0_0_33297510_4606.cpp:51:31: error: request for member 'top' in 'q', which is of non-class type 'int'
x = q.top();//更改当前位置
^
0_0_33297510_4606.cpp:52:27: error: request for member 'pop' in 'q', which is of non-class type 'int'
q.pop();//删除
^
0_0_33297510_4606.cpp:63:34: error: request for member 'top' in 'q', which is of non-class type 'int'
ans += q.top() - x;//右移
^
0_0_33297510_4606.cpp:64:31: error: request for member 'top' in 'q', which is of non-class type 'int'
x = q.top();//更改当前位置
^
0_0_33297510_4606.cpp:65:27: error: request for member 'pop' in 'q', which is of non-class type 'int'
q.pop();//删除
^
0_0_33297510_4606.cpp:74:29: error: request for member 'empty' in 'q', which is of non-class type 'int'
else if( !q.empty() )//如果左边没有蛋糕
^
0_0_33297510_4606.cpp:77:30: error: request for member 'top' in 'q', which is of non-class type 'int'
ans += q.top() - x;//右移
^
0_0_33297510_4606.cpp:78:27: error: request for member 'top' in 'q', which is of non-class type 'int'
x = q.top();//更改当前位置
^
0_0_33297510_4606.cpp:79:23: error: request for member 'pop' in 'q', which is of non-class type 'int'
q.pop();//删除
^
|