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: In function 'void dfs(int, int)':
a.cc:14:24: error: invalid types 'int[int]' for array subscript
   14 |     lowest[current]=pre[current]=timer++;
      |                        ^
a.cc:16:26: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]' (did you forget the '()' ?)
   16 |     for(i=0;i<G[current].size;i++){
      |               ~~~~~~~~~~~^~~~
      |                              ()
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: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++){
      |                                                     ~~~^~