0_0_17024615_21028.cpp:5:9: error: 'pair' does not name a type
typedef pair<int, int> pii;
^
0_0_17024615_21028.cpp:6:15: error: expected primary-expression before ';' token
const int N = ; //N表示节点数
^
0_0_17024615_21028.cpp:8:8: error: size of array 'c' is not an integral constant-expression
int c[N]; //c[i]表示i点目前到已选出的点中最短边的权值
^
0_0_17024615_21028.cpp:9:9: error: size of array 'v' is not an integral constant-expression
bool v[N]; //v[i] = 0表示i点目前还没有被选出
^
0_0_17024615_21028.cpp:10:1: error: 'vector' does not name a type
vector<pii> p[N]; //p[i]表示一点为i的边,另一点为p[i][j].first,该边权值为p[i][j].second
^
0_0_17024615_21028.cpp: In function 'int prim(int, int)':
0_0_17024615_21028.cpp:15:11: error: 'CLR' was not declared in this scope
CLR (v);
^
0_0_17024615_21028.cpp:16:5: error: 'priority_queue' was not declared in this scope
priority_queue<pii, vector<pii>, cmp> q;
^
0_0_17024615_21028.cpp:16:20: error: 'pii' was not declared in this scope
priority_queue<pii, vector<pii>, cmp> q;
^
0_0_17024615_21028.cpp:16:25: error: 'vector' was not declared in this scope
priority_queue<pii, vector<pii>, cmp> q;
^
0_0_17024615_21028.cpp:16:36: error: expected primary-expression before ',' token
priority_queue<pii, vector<pii>, cmp> q;
^
0_0_17024615_21028.cpp:16:38: error: 'cmp' was not declared in this scope
priority_queue<pii, vector<pii>, cmp> q;
^
0_0_17024615_21028.cpp:16:43: error: 'q' was not declared in this scope
priority_queue<pii, vector<pii>, cmp> q;
^
0_0_17024615_21028.cpp:20:16: error: 'maxint' was not declared in this scope
c[i] = maxint - 1000;
^
0_0_17024615_21028.cpp:23:30: error: 'p' was not declared in this scope
for (int i = 0; i < (int)p[0].size(); ++ i){
^
0_0_17024615_21028.cpp:24:13: error: expected ';' before 'tmp'
pii tmp = p[0][i];
^
0_0_17024615_21028.cpp:25:11: error: 'tmp' was not declared in this scope
c[tmp.first] = tmp.second;
^
0_0_17024615_21028.cpp:26:48: error: 'make_pair' was not declared in this scope
q.push (make_pair(tmp.first, tmp.second));
^
0_0_17024615_21028.cpp:31:13: error: expected ';' before 'tmp'
pii tmp = q.top(); q.pop();
^
0_0_17024615_21028.cpp:32:18: error: 'tmp' was not declared in this scope
while (v[tmp.first] && !q.empty()){
^
0_0_17024615_21028.cpp:35:15: error: 'tmp' was not declared in this scope
if (v[tmp.first]) break;
^
0_0_17024615_21028.cpp:37:18: error: 'tmp' was not declared in this scope
int t1 = tmp.first, t2 = tmp.second;
^
0_0_17024615_21028.cpp:38:17: error: 't2' was not declared in this scope
cost += t2;
^
0_0_17024615_21028.cpp:41:34: error: 'p' was not declared in this scope
for (int j = 0; j < (int)p[t1].size(); ++ j) if (!v[p[t1][j].first]){
^
0_0_17024615_21028.cpp:42:17: error: expected ';' before 't'
pii t = p[t1][j];
^
0_0_17024615_21028.cpp:43:19: error: 't' was not declared in this scope
if (c[t.first] > t.second){
^
0_0_17024615_21028.cpp:44:52: error: 'make_pair' was not declared in this scope
q.push (make_pair(t.first, t.second));
^
|