Submission #168524

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1685242019-12-13 12:25:52achibasadzishviliEvacuation plan (IZhO18_plan)C++14
Compilation error
0 ms0 KiB
nclude <bits/stdc++.h>
#define ll int
#define f first
#define s second
#define pb push_back
#define mp make_pair
using namespace std;
ll k,n,m,qq,d[100005],p[100005],c[100005],ans[100005],las,fix[100005];
ll qu[100005],sz[100005];
vector<ll>vec[100005];
vector<pair<ll,ll> >v[100005],q[100005];
set<pair<ll,ll> >st;
ll find(ll x){
if(p[x] == x)return x;
return p[x] = find(p[x]);
}
void join(ll x,ll y){
x = find(x);
y = find(y);
if(x == y)return;
if(sz[x] < sz[y])swap(x , y);
qu[x] += qu[y];
sz[x] += sz[y];
for(int i=0; i<q[y].size(); i++){
if(find(q[y][i].f) == x)
ans[q[y][i].s] = min(ans[q[y][i].s] , las);
q[x].pb(q[y][i]);
}
for(int i=0; i<vec[y].size(); i++){
vec[x].pb(vec[y][i]);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

plan.cpp:1:1: error: 'nclude' does not name a type
 nclude <bits/stdc++.h>
 ^~~~~~
plan.cpp:10:1: error: 'vector' does not name a type
 vector<ll>vec[100005];
 ^~~~~~
plan.cpp:11:1: error: 'vector' does not name a type
 vector<pair<ll,ll> >v[100005],q[100005];
 ^~~~~~
plan.cpp:12:1: error: 'set' does not name a type
 set<pair<ll,ll> >st;
 ^~~
plan.cpp: In function 'void join(int, int)':
plan.cpp:21:22: error: 'swap' was not declared in this scope
     if(sz[x] < sz[y])swap(x , y);
                      ^~~~
plan.cpp:24:20: error: 'q' was not declared in this scope
     for(int i=0; i<q[y].size(); i++){
                    ^
plan.cpp:26:30: error: 'min' was not declared in this scope
             ans[q[y][i].s] = min(ans[q[y][i].s] , las);
                              ^~~
plan.cpp:26:30: note: suggested alternative: 'join'
             ans[q[y][i].s] = min(ans[q[y][i].s] , las);
                              ^~~
                              join
plan.cpp:29:20: error: 'vec' was not declared in this scope
     for(int i=0; i<vec[y].size(); i++){
                    ^~~
plan.cpp: In function 'int main()':
plan.cpp:35:5: error: 'ios' has not been declared
     ios::sync_with_stdio(false);
     ^~~
plan.cpp:36:5: error: 'cin' was not declared in this scope
     cin >> n >> m;
     ^~~
plan.cpp:36:5: note: suggested alternative: 'main'
     cin >> n >> m;
     ^~~
     main
plan.cpp:41:9: error: 'v' was not declared in this scope
         v[x].pb(mp(y , z));
         ^
plan.cpp:6:12: error: 'make_pair' was not declared in this scope
 #define mp make_pair
            ^
plan.cpp:41:17: note: in expansion of macro 'mp'
         v[x].pb(mp(y , z));
                 ^~
plan.cpp:53:9: error: 'st' was not declared in this scope
         st.insert(mp(0LL , c[i]));
         ^~
plan.cpp:53:9: note: suggested alternative: 'sz'
         st.insert(mp(0LL , c[i]));
         ^~
         sz
plan.cpp:6:12: error: 'make_pair' was not declared in this scope
 #define mp make_pair
            ^
plan.cpp:53:19: note: in expansion of macro 'mp'
         st.insert(mp(0LL , c[i]));
                   ^~
plan.cpp:57:11: error: 'st' was not declared in this scope
     while(st.size()){
           ^~
plan.cpp:57:11: note: suggested alternative: 'sz'
     while(st.size()){
           ^~
           sz
plan.cpp:60:24: error: 'v' was not declared in this scope
         for(int i=0; i<v[x].size(); i++){
                        ^
plan.cpp:6:12: error: 'make_pair' was not declared in this scope
 #define mp make_pair
            ^
plan.cpp:63:28: note: in expansion of macro 'mp'
                 if(st.find(mp(d[to] , to)) != st.end())st.erase(st.find(mp(d[to] , to)));
                            ^~
plan.cpp:6:12: error: 'make_pair' was not declared in this scope
 #define mp make_pair
            ^
plan.cpp:65:27: note: in expansion of macro 'mp'
                 st.insert(mp(d[to] , to));
                           ^~
plan.cpp:76:9: error: 'q' was not declared in this scope
         q[x].pb(mp(y , i));
         ^
plan.cpp:6:12: error: 'make_pair' was not declared in this scope
 #define mp make_pair
            ^
plan.cpp:76:17: note: in expansion of macro 'mp'
         q[x].pb(mp(y , i));
                 ^~
plan.cpp:80:5: error: 'vector' was not declared in this scope
     vector<pair<ll,ll> >g;
     ^~~~~~
plan.cpp:80:12: error: 'pair' was not declared in this scope
     vector<pair<ll,ll> >g;
            ^~~~
plan.cpp:80:12: note: suggested alternative: 'main'
     vector<pair<ll,ll> >g;
            ^~~~
            main
plan.cpp:2:12: error: expected primary-expression before 'int'
 #define ll int
            ^
plan.cpp:80:17: note: in expansion of macro 'll'
     vector<pair<ll,ll> >g;
                 ^~
plan.cpp:83:9: error: 'g' was not declared in this scope
         g.pb(mp(d[i] , i));
         ^
plan.cpp:6:12: error: 'make_pair' was not declared in this scope
 #define mp make_pair
            ^
plan.cpp:83:14: note: in expansion of macro 'mp'
         g.pb(mp(d[i] , i));
              ^~
plan.cpp:87:10: error: 'g' was not declared in this scope
     sort(g.begin() , g.end());
          ^
plan.cpp:87:5: error: 'sort' was not declared in this scope
     sort(g.begin() , g.end());
     ^~~~
plan.cpp:87:5: note: suggested alternative: 'short'
     sort(g.begin() , g.end());
     ^~~~
     short
plan.cpp:88:5: error: 'reverse' was not declared in this scope
     reverse(g.begin() , g.end());
     ^~~~~~~
plan.cpp:92:22: error: 'q' was not declared in this scope
         qu[i] = (int)q[i].size();
                      ^
plan.cpp:93:9: error: 'vec' was not declared in this scope
         vec[i].pb(i);
         ^~~
plan.cpp:100:24: error: 'v' was not declared in this scope
         for(int j=0; j<v[g[i].s].size(); j++){
                        ^
plan.cpp:110:9: error: 'cout' was not declared in this scope
         cout << ans[i] << '\n';
         ^~~~