Language: C++

#include <iostream>
#include <vector>
#include <cstring>
#include <set>
#define MAX 100005
using namespace std;

int timer,N,E;
vector<int> G[MAX]
int V[MAX],parent[MAX],lowest[MAX],pre[MAX];

void dfs(int current,int pre){
    V[current]=1;
    lowest[current]=pre[current]=timer++;
    int i;
    for(i=0;i<G[current].size;i++){
        int next=G[current][i];
        if(!V[next]){
            parent[next]=current;
            dfs(next,current);
            lowest[current]=min(lowest[current],lowest[next]);
        }else if(next!=pre){
            lowest[current]=min(lowest[current],pre[next]);
        }
    }
}

int main()
{
    memset(pre,0,sizeof(pre));
    memset(parent,0,sizeof(parent));
    memset(lowest,0,sizeof(lowest));
    memset(V,0,sizeof(V));
    timer=1;
    cin>>N>>E;
    int i,j;
    for(i=0;i<E;i++){
        int a,b;
        cin>>a>>b;
        G[a].push_back(b);
        G[b].push_back(a);
    }
    dfs(0,-1);
    int np;
    set<int> ans;
    for(i=1;i<N;i++){
        int p=parent[i];
        if(p==0)np++;
        else if(pre[p]<=lowest[i])ans.insert(p);
    }
    if(np>1)ans.insert(0);
    for(set<int>::iterator it=ans.begin;it!=ans.end;ans++){
        cout<<*it<<endl;
    }
    return 0;
}

Compiler output:
a.cc:10:1: error: expected initializer before 'int'
   10 | int V[MAX],parent[MAX],lowest[MAX],pre[MAX];
      | ^~~
a.cc: In function 'void dfs(int, int)':
a.cc:13:5: error: 'V' was not declared in this scope
   13 |     V[current]=1;
      |     ^
a.cc:14:5: error: 'lowest' was not declared in this scope
   14 |     lowest[current]=pre[current]=timer++;
      |     ^~~~~~
a.cc:14:24: error: invalid types 'int[int]' for array subscript
   14 |     lowest[current]=pre[current]=timer++;
      |                        ^
a.cc:16:15: error: 'G' was not declared in this scope
   16 |     for(i=0;i<G[current].size;i++){
      |               ^
a.cc:19:13: error: 'parent' was not declared in this scope
   19 |             parent[next]=current;
      |             ^~~~~~
a.cc:23:52: error: invalid types 'int[int]' for array subscript
   23 |             lowest[current]=min(lowest[current],pre[next]);
      |                                                    ^
a.cc: In function 'int main()':
a.cc:30:12: error: 'pre' was not declared in this scope
   30 |     memset(pre,0,sizeof(pre));
      |            ^~~
a.cc:31:12: error: 'parent' was not declared in this scope
   31 |     memset(parent,0,sizeof(parent));
      |            ^~~~~~
a.cc:32:12: error: 'lowest' was not declared in this scope
   32 |     memset(lowest,0,sizeof(lowest));
      |            ^~~~~~
a.cc:33:12: error: 'V' was not declared in this scope
   33 |     memset(V,0,sizeof(V));
      |            ^
a.cc:40:9: error: 'G' was not declared in this scope
   40 |         G[a].push_back(b);
      |         ^
a.cc:52:35: error: invalid use of non-static member function 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::begin() const [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; iterator = std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator]'
   52 |     for(set<int>::iterator it=ans.begin;it!=ans.end;ans++){
      |                               ~~~~^~~~~
In file included from /usr/include/c++/14/set:63,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_set.h:346:7: note: declared here
  346 |       begin() const _GLIBCXX_NOEXCEPT
      |       ^~~~~
a.cc:52:43: error: invalid use of non-static member function 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::end() const [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; iterator = std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator]'
   52 |     for(set<int>::iterator it=ans.begin;it!=ans.end;ans++){
      |                                         ~~^~~~~~~~~
/usr/include/c++/14/bits/stl_set.h:355:7: note: declared here
  355 |       end() const _GLIBCXX_NOEXCEPT
      |       ^~~
a.cc:52:56: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   52 |     for(set<int>::iterator it=ans.begin;it!=ans.end;ans++){
      |                                                     ~~~^~