Submission #103621

# Submission time Handle Problem Language Result Execution time Memory
103621 2019-04-01T09:53:55 Z vex Tropical Garden (IOI11_garden) C++14
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#include <gardenlib.h>
#define maxn 150005
#define pii pair<int,int>
#define nd first
#define act second
using namespace std;

int nxt[maxn][2];
pii sl[maxn][2];
vector<pii>adj[maxn][2];
int duz[maxn][2];
int in[maxn][2];
bool bio[maxn][2];
stack<int>null;


int count_routes(int n,int m,int p,int r[][],int q,int g[])
{
    for(int i=0;i<n;i++)nxt[i][0]=nxt[i][1]=-1;
    for(int i=0;i<m;i++)
    {
        int v1=r[i][0];
        int v2=r[i][1];

        nxt[v1][1]=nxt[v1][0];
        nxt[v1][0]=v2;

        nxt[v2][1]=nxt[v2][0];
        nxt[v2][0]=v1;
    }///change sth
    for(int u=0;u<n;u++)
    {
        int v0=nxt[u][0];
        if(nxt[v0][0]==u)
        {
            sl[u][0]={v0,1};
        }
        else sl[u][1]={v0,0};

        int v1=nxt[u][1];
        if(nxt[v1][0]==u)
        {
            sl[u][1]={v1,1};
        }
        else sl[u][1]={v1,0};
    }

    for(int u=0;u<n;u++)
    {
        pii v1=sl[u][0];
        pii v2=sl[u][1];

        adj[v1.nd][v1.act].push_back({u,0});
        adj[v2.nd][v2.act].push_back({u,1});

        in[v1.nd][v1.acr]
    }



}

int main()
{

    return 0;
}

Compilation message

garden.cpp:18:44: error: declaration of 'r' as multidimensional array must have bounds for all dimensions except the first
 int count_routes(int n,int m,int p,int r[][],int q,int g[])
                                            ^
garden.cpp:18:45: error: expected ')' before ',' token
 int count_routes(int n,int m,int p,int r[][],int q,int g[])
                                             ^
garden.cpp:18:46: error: expected unqualified-id before 'int'
 int count_routes(int n,int m,int p,int r[][],int q,int g[])
                                              ^~~