Submission #866983

# Submission time Handle Problem Language Result Execution time Memory
866983 2023-10-27T14:33:04 Z Ice_man ICC (CEOI16_icc) C++14
Compilation error
0 ms 0 KB
#include <iostream>
#include <vector>
#include <cstring>

#define maxn 105

using namespace std;

vector <int> path;
bool used[maxn];

vector <int> v[maxn];

void dfs(int node)
{
    path.push_back(node);
    used[node] = true;

    for(int nb : v[node]) if(used[nb] == false) dfs(nb);
}

void _set()
{
    memset(used , 0 , sizeof(used));
    path.clear();
}

void _fill()
{
    _set();
    for(int node = 0; node < v.size(); node++) if(used[node] == false) dfs(node);

}

void _add()
{
    /// ne znam
    /// posle she go opraq



}



void run(int n)
{

}


Compilation message

icc.cpp: In function 'void _fill()':
icc.cpp:31:32: error: request for member 'size' in 'v', which is of non-class type 'std::vector<int> [105]'
   31 |     for(int node = 0; node < v.size(); node++) if(used[node] == false) dfs(node);
      |                                ^~~~