Language: C++

#include "bits/stdc++.h"
using namespace std;


class Timer {
#ifdef LOCAL
	std::chrono::high_resolution_clock::time_point m_start;
public:
	Timer() 
	: m_start(std::chrono::high_resolution_clock::now()) {}

	~Timer() {
		auto end = std::chrono::high_resolution_clock::now();
  		auto duration_s = std::chrono::duration<double>(end - m_start).count();
  		cerr << "Completed in " << duration_s << endl;
  	}
#else
#endif
};

// template < class c > struct rge { c b, e; };
// template < class c > rge<c> range(c i, c j) { return rge<c>{i, j}; }
// template < class c > auto dud(c* x) -> decltype(cerr << *x, 0);
// template < class c > char dud(...);
// struct debug {
// #ifdef LOCAL
// 	~debug() { cerr << endl; }
// 	template < class c > typename enable_if<sizeof dud<c>(0) != 1, debug&>::type operator<<(c i) { cerr << boolalpha << i; return *this; }
// 	template < class c > typename enable_if<sizeof dud<c>(0) == 1, debug&>::type operator<<(c i) { return *this << range(begin(i), end(i)); }
// 	template < class c, class b > debug & operator <<(pair < b, c > d) {
// 	  return * this << "(" << d.first << ", " << d.second << ")";
// 	}
// 	template < class c > debug & operator <<(rge<c> d) {
// 	  *this << "[";
// 	  for (auto it = d.b; it != d.e; ++it)
// 	    *this << ", " + 2 * (it == d.b) << *it;
// 	  return * this << "]";
// 	}
// #else
// 	template < class c > debug & operator <<(const c&) { return * this; }
// #endif
// };
// #define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

#define ll long long;

#define for0(i,n) for(int i=0; i<n; i++)
#define for1(i,n) for(int i=1; i<=n; i++)
#define forr(i,n) for(int i=n-1; i>=0; i--)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
const int INF = 1e9 + 5;

#define FAST ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

#include <iostream>

void solve() {
	ll n;
	cin >> n;
	vector<ll> s(n);

	ll size = pow(2, n);

	for (ll i = 0; i < size; ++i) {
		cin >> s[i];
	}
	sort(s.begin(), s.end());

	ll expectedCount = 1;

	for (ll i = size-1; i > 0; --i) {
		ll count = 1;
		if(s[i] == s[i-1]) {
			if (++count > expectedCount) {
				cout << "NO" << endl;
				return;
			}
		} else {
			count = 0;
		}

	}
	cout << "YES" << endl;
	
}

int main() {
	FAST
	int t = 1;
	// cin >> t;

	for (int i = 0; i < t; ++i) {
		solve();
	}
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:45:17: error: declaration does not declare anything [-fpermissive]
   45 | #define ll long long;
      |                 ^~~~
a.cc:59:9: note: in expansion of macro 'll'
   59 |         ll n;
      |         ^~
a.cc:59:12: error: 'n' was not declared in this scope; did you mean 'yn'?
   59 |         ll n;
      |            ^
      |            yn
a.cc:45:17: error: template argument 1 is invalid
   45 | #define ll long long;
      |                 ^~~~
a.cc:61:16: note: in expansion of macro 'll'
   61 |         vector<ll> s(n);
      |                ^~
a.cc:45:17: error: template argument 2 is invalid
   45 | #define ll long long;
      |                 ^~~~
a.cc:61:16: note: in expansion of macro 'll'
   61 |         vector<ll> s(n);
      |                ^~
a.cc:61:18: error: expected primary-expression before '>' token
   61 |         vector<ll> s(n);
      |                  ^
a.cc:61:20: error: 's' was not declared in this scope
   61 |         vector<ll> s(n);
      |                    ^
a.cc:45:17: error: declaration does not declare anything [-fpermissive]
   45 | #define ll long long;
      |                 ^~~~
a.cc:63:9: note: in expansion of macro 'll'
   63 |         ll size = pow(2, n);
      |         ^~
a.cc:45:17: error: declaration does not declare anything [-fpermissive]
   45 | #define ll long long;
      |                 ^~~~
a.cc:65:14: note: in expansion of macro 'll'
   65 |         for (ll i = 0; i < size; ++i) {
      |              ^~
a.cc:65:17: error: 'i' was not declared in this scope
   65 |         for (ll i = 0; i < size; ++i) {
      |                 ^
a.cc:65:32: error: expected ')' before ';' token
   65 |         for (ll i = 0; i < size; ++i) {
      |             ~                  ^
      |                                )
a.cc:65:36: error: 'i' was not declared in this scope
   65 |         for (ll i = 0; i < size; ++i) {
      |                                    ^
a.cc:45:17: error: declaration does not declare anything [-fpermissive]
   45 | #define ll long long;
      |                 ^~~~
a.cc:70:9: note: in expansion of macro 'll'
   70 |         ll expectedCount = 1;
      |         ^~
a.cc:70:12: error: 'expectedCount' was not declared in this scope
   70 |         ll expectedCount = 1;
      |            ^~~~~~~~~~~~~
a.cc:45:17: error: declaration does not declare anything [-fpermissive]
   45 | #define ll long long;
      |                 ^~~~
a.cc:72:14: note: in expansion of macro 'll'
   72 |         for (ll i = size-1; i > 0; --i) {
      |              ^~
a.cc:72:25: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator-'
   72 |         for (ll i = size-1; i > 0; --i) {
      |                     ~~~~^~
a.cc:72:34: error: expected ')' before ';' token
   72 |         for (ll i = size-1; i > 0; --i) {
      |             ~                    ^
      |                                  )