Language: C++

#include<cmath>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
const int maxn=1e5;
int n;
int a[maxn+8][3],move[2],rev[2];

int read()
{
    int x=0,f=1;char ch=getchar();
    for (;ch<'0'||ch>'9';ch=getchar()) if (ch=='-') f=-1;
    for (;ch>='0'&&ch<='9';ch=getchar()) x=x*10+ch-'0';
    return x*f;
}

int main()
{
    n=read();
    for (int i=1;i<=n;i++) a[i][0]=read();
    for (int i=1;i<=n;i++) a[i][1]=read();
    for (int i=1;i<=n;i++) a[i][2]=read();
    bool flag=1;
    for (int i=1;i<=n;i++)
	{
	    int cnt=abs(a[i][0]-a[i][1])+abs(a[i][2]-a[i][1]);
	    if (cnt!=2)
		{
		    flag=0;
		    break;
		}
	    int x=min(a[i][0],a[i][2]);
	    if (x%3!=1)
		{
		    flag=0;
		    break;
		}
	    if (a[i][0]>a[i][1]) rev[i&1]++;
	    move[i&1]+=max(0,(i-(x+2)/3)/2);
	}
    //printf("%d %d\n",move[1],rev[1]);
    if ((!flag)||((move[0]^rev[1])&1)||((move[1]^rev[0])&1)) puts("No");
    else puts("Yes");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:13: error: reference to 'move' is ambiguous
   41 |             move[i&1]+=max(0,(i-(x+2)/3)/2);
      |             ^~~~
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:5:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:353:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::move(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2)'
  353 | move(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __d_first);
      | ^~~~
In file included from /usr/include/c++/14/bits/specfun.h:43,
                 from /usr/include/c++/14/cmath:3906,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:675:5: note:                 'template<class _II, class _OI> _OI std::move(_II, _II, _OI)'
  675 |     move(_II __first, _II __last, _OI __result)
      |     ^~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:61,
                 from /usr/include/c++/14/bits/stl_algobase.h:64:
/usr/include/c++/14/bits/move.h:137:5: note:                 'template<class _Tp> constexpr typename std::remove_reference<_Tp>::type&& std::move(_Tp&&)'
  137 |     move(_Tp&& __t) noexcept
      |     ^~~~
a.cc:9:18: note:                 'int move [2]'
    9 | int a[maxn+8][3],move[2],rev[2];
      |                  ^~~~
a.cc:44:20: error: reference to 'move' is ambiguous
   44 |     if ((!flag)||((move[0]^rev[1])&1)||((move[1]^rev[0])&1)) puts("No");
      |                    ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:353:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::move(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2)'
  353 | move(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __d_first);
      | ^~~~
/usr/include/c++/14/bits/stl_algobase.h:675:5: note:                 'template<class _II, class _OI> _OI std::move(_II, _II, _OI)'
  675 |     move(_II __first, _II __last, _OI __result)
      |     ^~~~
/usr/include/c++/14/bits/move.h:137:5: note:                 'template<class _Tp> constexpr typename std::remove_reference<_Tp>::type&& std::move(_Tp&&)'
  137 |     move(_Tp&& __t) noexcept
      |     ^~~~
a.cc:9:18: note:                 'int move [2]'
    9 | int a[maxn+8][3],move[2],rev[2];
      |                  ^~~~
a.cc:44:42: error: reference to 'move' is ambiguous
   44 |     if ((!flag)||((move[0]^rev[1])&1)||((move[1]^rev[0])&1)) puts("No");
      |                                          ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:353:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::move(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2)'
  353 | move(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __d_first);
      | ^~~~
/usr/include/c++/14/bits/stl_algobase.h:675:5: note:                 'template<class _II, class _OI> _OI std::move(_II, _II, _OI)'
  675 |     move(_II __first, _II __last, _OI __result)
      |     ^~~~
/usr/include/c++/14/bits/move.h:137:5: note:                 'template<class _Tp> constexpr typename std::remove_reference<_Tp>::type&& std::move(_Tp&&)'
  137 |     move(_Tp&& __t) noexcept
      |     ^~~~
a.cc:9:18: note:                 'int move [2]'
    9 | int a[maxn+8][3],move[2],rev[2];
      |                  ^~~~