Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
using namespace std;
vector<int> neighbors[100000];
//int status[100000];
int dtime[100000];
int hca[100000];
bool visited[100000];
int clock;
int parent[100000];

void dfs(int current,int prev)
{
    visited[current]=true;
    hca[current]=dtime[current]=clock++;
    //??????????±?
    for(int i=0;i<neighbors[current].size();i++)
    {
        int next=neighbors[current][i];

        if(!visited[next])
        {
            parent[next]=current;  //??¨????????´??°parent??°????????¨??????????????\?????????
            dfs(next,current); //????????\???DFS
            if(hca[next]<dtime[current]) //???????????£??????????????????????????¬??£???????\????
            {
                hca[current]=min(hca[next],hca[current]);  //?????¬??£???????????????????????\???????????????????????´???????\???????
            }
        }
        else if(next!=prev)  //???????????£?¢??????????????????´???????????????
        {
            hca[current]=min(hca[current],dtime[next]);  //???????????????????????????????\????????????´???????????????????????´??°hca
        }
    }
}

void bcc(int n)
{
    for(int i=0;i<n;i++) visited[i]=false;
    clock=1;

    dfs(0,-1); //???0????§?
    //??????0????\????
    int np; //????????????????????°
    set<int> result;  //??¨set?????????????????\?????¨??????
    for(int i=1;i<n;i++)
    {
        int p=parent[i];
        if(p==0) np++;
        else if(hca[i]>=dtime[p]) result.insert(p);
    }
    if(np>=2) result.insert(0);  //??????????????°??§?????????2???????????????0???????????????
    for(set<int>::iterator it=result.begin();it!=result.end();it++)
    {
        cout<<*it<<endl;
    }
}
int main()
{
    int num,N;
    cin>>N>>num;
    for(int i=0;i<num;i++)
    {
        int a,b;
        cin>>a>>b;
        neighbors[a].push_back(b);
        neighbors[b].push_back(a);
    }
    bcc(N);
    return 0;
}

Compiler output:
a.cc:11:5: error: 'int clock' redeclared as different kind of entity
   11 | int clock;
      |     ^~~~~
In file included from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
                 from /usr/include/c++/14/ext/atomicity.h:35,
                 from /usr/include/c++/14/bits/ios_base.h:39,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/time.h:72:16: note: previous declaration 'clock_t clock()'
   72 | extern clock_t clock (void) __THROW;
      |                ^~~~~
a.cc: In function 'void dfs(int, int)':
a.cc:17:33: warning: ISO C++ forbids incrementing a pointer of type 'clock_t (*)() noexcept' {aka 'long int (*)() noexcept'} [-Wpointer-arith]
   17 |     hca[current]=dtime[current]=clock++;
      |                                 ^~~~~
a.cc:17:38: error: lvalue required as increment operand
   17 |     hca[current]=dtime[current]=clock++;
      |                                      ^~
a.cc: In function 'void bcc(int)':
a.cc:42:10: error: assignment of function 'clock_t clock()'
   42 |     clock=1;
      |     ~~~~~^~