Language: C++

#include <iostream>
#include <vector>

using namespace std;

bool checker(vector<int>* set);

int main()
{
	int count = 0;
	int time = 0;
	int x = 0;
	int y = 0;
	bool check = false;
	cin >> count;

	vector<int>* set = new vector<int>();

	set->clear();
	set->resize(3 * count);

	for (int i = 0; i < count; ++i)
	{
		cin >> time >> x >> y;
		set->push_back(time);
		set->push_back(x);
		set->push_back(y);
	}

	check = checker(set);

	if (check)
	{
		cout << "Yes" << endl;
	}
	else
	{
		cout << "No" << endl;
	}

	delete set;
	return 0;
}

bool checker(vector<int>* set)
{
	bool result = true;
	int x = 0;
	int y = 0;
	int j = 0;
	for (int i = 0; i < set->size(); i += 3)
	{
		for (; j < (*set)[i]; ++j)
		{
			if ((*set)[i+1] - x >= 0)
			{
				++x;
			}
			else if ((*set)[i + 1] - x < 0)
			{
				--x;
			}
			else if ((*set>[i + 2] - y >= 0)
			{
				++y;
			}
			else
			{
				--y;
			}
			if (set->at(i + 1) != x && set->at(i + 2) != y)
			{
				result = false;
			}
		}
		if (result)
		{
			break;
		}
	}
	return result;
}

Compiler output:
a.cc: In function 'bool checker(std::vector<int>*)':
a.cc:63:42: error: expected ',' before '+' token
   63 |                         else if ((*set>[i + 2] - y >= 0)
      |                                          ^~
      |                                          ,
a.cc:63:43: error: expected identifier before '+' token
   63 |                         else if ((*set>[i + 2] - y >= 0)
      |                                           ^
a.cc: In lambda function:
a.cc:63:48: error: expected '{' before '-' token
   63 |                         else if ((*set>[i + 2] - y >= 0)
      |                                                ^
a.cc: In function 'bool checker(std::vector<int>*)':
a.cc:63:48: error: no match for 'operator-' (operand types are 'checker(std::vector<int>*)::<lambda()>' and 'int')
   63 |                         else if ((*set>[i + 2] - y >= 0)
      |                                        ~~~~~~~ ^ ~
      |                                        |         |
      |                                        |         int
      |                                        checker(std::vector<int>*)::<lambda()>
In file included from /usr/include/c++/14/string:48,
                 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/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  618 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note:   template argument deduction/substitution failed:
a.cc:63:50: note:   'checker(std::vector<int>*)::<lambda()>' is not derived from 'const std::reverse_iterator<_Iterator>'
   63 |                         else if ((*set>[i + 2] - y >= 0)
      |                                                  ^
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1790 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note:   template argument deduction/substitution failed:
a.cc:63:50: note:   'checker(std::vector<int>*)::<lambda()>' is not derived from 'const std::move_iterator<_IteratorL>'
   63 |                         else if ((*set>[i + 2] - y >= 0)
      |                                                  ^
a.cc:63:57: error: expected ')' before '{' token
   63 |                         else if ((*set>[i + 2] - y >= 0)
      |                                 ~                       ^
      |                                                         )
   64 |                         {
      |                         ~                                
a.cc:75:17: error: expected primary-expression before '}' token
   75 |                 }
      |                 ^