Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<math.h>
#include<algorithm>
#include<numeric>

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
typedef vector<LL> VLL;
typedef vector<ULL> VULL;

class MYCP {
public:

	//���l���؂��ĕ�����ɂ���
	static string MakeString_LongLong(vector<long long> const& numbers, string const& str) {
		if (numbers.size() == 0)return "";
		string result = "" + to_string(numbers[0]);
		for (long long i = 1; i < numbers.size(); i++) {
			result += str;
			result += to_string(numbers[i]);
		}

		return result;
	}

	//�󔒂ŋ�؂�ׂ̃I�[�o�[���[�h
	static string MakeString_LongLong(vector<long long> const& numbers) {
		if (numbers.size() == 0)return "";
		string result = "" + to_string(numbers[0]);
		for (long long i = 1; i < numbers.size(); i++) {
			result += " ";
			result += to_string(numbers[i]);
		}

		return result;
	}



	//������̔z�����s���ł܂Ƃ߂�
	static string MakeString_VectorString(vector<string> const& str) {
		string result = "";
		for (long long i = 0; i < str.size(); i++) {
			result += str[i] + "\n";
		}

		return result;
	}

	//�������K�v�Ȍ������ǂݎ��
	static vector<string> MyReadLineSplit(LL n) {
		vector<string> str(n);
		for (long long i = 0; i < n; i++) {
			std::cin >> str[i];
		}

		return str;
	}

	//���l��K�v�Ȍ������ǂݎ��
	static vector<long long> ReadInts(long long number) {
		vector<long long> a(number);
		for (int i = 0; i < number; i++) {
			std::cin >> a[i];
		}

		return a;
	}

	//�n���ꂽ���R�����f���Ȃ�ture��Ԃ�
	static bool PrimeCheck_Int(long long number) {
		if (number < 2)return false;

		for (ULL i = 2; i*i <= number; i++) {
			if (number%i == 0)return false;
		}

		return true;
	}

	//�n���ꂽ���l�ȉ��̑f���\����
	static vector<long long> MakePrimeList(long long n) {
		vector<long long> list;
		LL i, j, p;
		bool flag;
		for (i = 2; i <= n; i++) {
			flag = true;
			for (j = 0; j < list.size(); j++) {

				if (!(list[j] * list[j] <= i))break;

				if (i%list[j] == 0) {
					flag = false;
					break;
				}
			}
			if (flag)list.push_back(i);
		}

		return list;
	}



	//������̕���
	static vector<string> split(string const& str, char sep)
	{
		vector<std::string> v;        // �������ʂ�i�[����x�N�^�[
		auto first = str.begin();              // �e�L�X�g�̍ŏ���w���C�e���[�^
		while (first != str.end()) {         // �e�L�X�g���c���Ă���ԃ��[�v
			auto last = first;                      // ���������񖖔��ւ̃C�e���[�^
			while (last != str.end() && *last != sep)       // ���� or �Z�p���[�^�����܂Ői�߂�
				last++;
			v.push_back(string(first, last));       // ����������o��
			if (last != str.end())
				last++;
			first = last;          // ���̏����̂��߂ɃC�e���[�^��ݒ�
		}
		return v;
	}

	//���v��߂�
	static LL Sum(vector<LL> a) {
		LL i, sum = 0;

		for (i = 0; i < a.size(); i++) {
			sum += a[i];
		}

		return sum;
	}

	//�������Ȃ�true��Ԃ�
	static bool Komoji(char a) {
		if (a >= 'a'&&a <= 'z')return true;

		return false;
	}

	//�啶���Ȃ�true��Ԃ�
	static bool Oomoji(char a) {
		if (a >= 'A'&&a <= 'Z')return true;

		return false;
	}

	static LL SaidaiKouyakuSuu(LL a, LL b) {
		LL temp;
		if (a < b) {
			temp = b;
			b = a;
			a = temp;
		}

		while (true)
		{
			temp = a % b;
			a = b;
			b = temp;
			if (b == 0)break;
		}

		return a;
	}

	static LL SaisyouKoubaiSuu(LL a, LL b) {
		return (a / SaidaiKouyakuSuu(a, b))*b;
	}

};

//�ݐϘa��߂�N���X
class Syakutori {
private:
	vector<LL> list;

public:

	void MakeArray(vector<LL> data) {
		LL i;
		list = data;
		list.push_back(0);
		list[0] = 0;
		for (i = 1; i < list.size(); i++) {
			list[i] = list[i - 1] + data[i - 1];
		}

	}

	LL Sum(LL start, LL end) {
		if (end < start) {
			cout << "start��end���傫���ł�";
			return 0;
		}
		if (start < 0 || end >= list.size()) {
			cout << "�͈͂��ُ�";
			return 0;
		}

		return list[end] - list[start];
	}




};




int main(void) {
	int n, judge;
	cin >> n;
	vector<string> w(n);
	for (int i = 0; i < n; i++) {
		cin >> w.at(n);
	}
	for (int i = 0; i < n; i++) {
		for (int j = i + 1; j < n; j++) {
			if (w.at(i) == w.at(j)) {
				judge = 1;
			}
		}
	}
	for (int i = 1; i < n; i++) {
		if (w.at(w.size(w.at(i - 1)) - 1) != w.at(w.size(w.at(i)))) {
			judge = 1;
		}
	}
	if (judge != 1)
		cout << "Yes" << endl;
	else
		cout << "No" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:230:32: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::size(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)'
  230 |                 if (w.at(w.size(w.at(i - 1)) - 1) != w.at(w.size(w.at(i)))) {
      |                          ~~~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:992:7: note: candidate: 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int]'
  992 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
/usr/include/c++/14/bits/stl_vector.h:992:7: note:   candidate expects 0 arguments, 1 provided
a.cc:230:65: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::size(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)'
  230 |                 if (w.at(w.size(w.at(i - 1)) - 1) != w.at(w.size(w.at(i)))) {
      |                                                           ~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:992:7: note: candidate: 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int]'
  992 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
/usr/include/c++/14/bits/stl_vector.h:992:7: note:   candidate expects 0 arguments, 1 provided