0_0_36527226_4664.cpp:8:5: error: 'vector' does not name a type
vector<ll> mark, dist, to;
^
0_0_36527226_4664.cpp:9:5: error: 'vector' does not name a type
vector<vector<ll>> e; //二元组为{v,距离w}
^
0_0_36527226_4664.cpp:13:17: error: 'vector' has not been declared
Prim(int n, vector<vector<ll>> e)
^
0_0_36527226_4664.cpp:13:23: error: expected ',' or '...' before '<' token
Prim(int n, vector<vector<ll>> e)
^
0_0_36527226_4664.cpp: In constructor 'Prim::Prim(int, int)':
0_0_36527226_4664.cpp:14:17: error: class 'Prim' does not have any field named 'e'
: n(n), e(e)
^
0_0_36527226_4664.cpp:14:19: error: 'e' was not declared in this scope
: n(n), e(e)
^
0_0_36527226_4664.cpp:16:9: error: 'mark' was not declared in this scope
mark.resize(n + 1), dist.resize(n + 1), to.resize(n + 1);
^
0_0_36527226_4664.cpp:16:29: error: 'dist' was not declared in this scope
mark.resize(n + 1), dist.resize(n + 1), to.resize(n + 1);
^
0_0_36527226_4664.cpp:16:49: error: 'to' was not declared in this scope
mark.resize(n + 1), dist.resize(n + 1), to.resize(n + 1);
^
0_0_36527226_4664.cpp: In member function 'void Prim::init(int)':
0_0_36527226_4664.cpp:21:9: error: 'mark' was not declared in this scope
mark.resize(n + 1, 0), dist.resize(n + 1, 0), to.resize(n + 1, 0);
^
0_0_36527226_4664.cpp:21:32: error: 'dist' was not declared in this scope
mark.resize(n + 1, 0), dist.resize(n + 1, 0), to.resize(n + 1, 0);
^
0_0_36527226_4664.cpp:21:55: error: 'to' was not declared in this scope
mark.resize(n + 1, 0), dist.resize(n + 1, 0), to.resize(n + 1, 0);
^
0_0_36527226_4664.cpp: In member function 'll Prim::prim()':
0_0_36527226_4664.cpp:28:13: error: 'dist' was not declared in this scope
dist[i] = 9e18;
^
0_0_36527226_4664.cpp:29:9: error: 'dist' was not declared in this scope
dist[rt] = 0;
^
0_0_36527226_4664.cpp:34:22: error: 'mark' was not declared in this scope
if (!mark[i] && dist[i] < dist[cur])
^
0_0_36527226_4664.cpp:37:37: error: 'max' was not declared in this scope
ans = max(ans, dist[cur]);
^
0_0_36527226_4664.cpp:38:19: error: 'mark' was not declared in this scope
cc--, mark[cur] = 1;
^
0_0_36527226_4664.cpp:43:26: error: 'e' was not declared in this scope
auto w = e[v][cur];
^
0_0_36527226_4664.cpp:47:21: error: 'to' was not declared in this scope
to[v] = cur;
^
0_0_36527226_4664.cpp: At global scope:
0_0_36527226_4664.cpp:55:9: error: 'pair' does not name a type
typedef pair<int, int> pii;
^
0_0_36527226_4664.cpp: In function 'int main()':
0_0_36527226_4664.cpp:60:5: error: 'cin' was not declared in this scope
cin >> T;
^
0_0_36527226_4664.cpp:67:9: error: 'vector' was not declared in this scope
vector<pair<int, int>> p(n + 1);
^
0_0_36527226_4664.cpp:67:16: error: 'pair' was not declared in this scope
vector<pair<int, int>> p(n + 1);
^
0_0_36527226_4664.cpp:67:21: error: expected primary-expression before 'int'
vector<pair<int, int>> p(n + 1);
^
0_0_36527226_4664.cpp:72:20: error: 'p' was not declared in this scope
cin >> p[i].first >> p[i].second;
^
0_0_36527226_4664.cpp:75:21: error: 'struct Prim' has no member named 'e'
pri.e[i][j] = pri.e[j][i] = 1ll * (p[i].first - p[j].first) * (p[i].first - p[j].first) + 1ll * (p[i].second - p[j].second) * (p[i].second - p[j].second);
^
0_0_36527226_4664.cpp:75:35: error: 'struct Prim' has no member named 'e'
pri.e[i][j] = pri.e[j][i] = 1ll * (p[i].first - p[j].first) * (p[i].first - p[j].first) + 1ll * (p[i].second - p[j].second) * (p[i].second - p[j].second);
^
0_0_36527226_4664.cpp:78:9: error: 'cout' was not declared in this scope
cout << pri.prim() << "\n";
^
|