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


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2025-01-11 04:12:37, Gzip enabled