Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
const int N=2e5+500;
int p[N],size[N],n,m;
int main()
{
    scanf("%d%d",&n,&m);
    for(int i=1;i<=n;i++)size[i]=1;p[1]=1;
    for(int i=1,x,y;i<=m;i++)
    {
        scanf("%d%d",&x,&y);
        if(p[x])p[y]=1;
        if(size[x]==1)p[x]=0;
        ++size[y],--size[x];    
    }
    int ans=0;
    for(int i=1;i<=n;i++)if(p[i])++ans;
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: reference to 'size' is ambiguous
   10 |     for(int i=1;i<=n;i++)size[i]=1;p[1]=1;
      |                          ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 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/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:6:10: note:                 'int size [200500]'
    6 | int p[N],size[N],n,m;
      |          ^~~~
a.cc:15:12: error: reference to 'size' is ambiguous
   15 |         if(size[x]==1)p[x]=0;
      |            ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:6:10: note:                 'int size [200500]'
    6 | int p[N],size[N],n,m;
      |          ^~~~
a.cc:16:11: error: reference to 'size' is ambiguous
   16 |         ++size[y],--size[x];
      |           ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:6:10: note:                 'int size [200500]'
    6 | int p[N],size[N],n,m;
      |          ^~~~
a.cc:16:21: error: reference to 'size' is ambiguous
   16 |         ++size[y],--size[x];
      |                     ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:6:10: note:                 'int size [200500]'
    6 | int p[N],size[N],n,m;
      |          ^~~~