Language: C++


#include<iostream>
#include<iomanip>
#include<vector>
#include<map>
#include<set>
#include<algorithm>
#include<numeric>
#include<limits>
#include<bitset>
#include<functional>
#include<type_traits>
#include<queue>
#include<stack>
#include<array>
#include<random>
#include<utility>
#include<cstdlib>
#include<cstring>
#include<string>
#include<ctime>


using namespace std;

using ll = long long int;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const double PI = acos(-1.0);
#define YES(n) cout << ((n) ? "YES" : "NO") << endl;
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl;
#define all(v) v.begin(), v.end()
const long MOD = pow(10, 9) + 7;

char alfa[] = { 'A','B' ,'C','D' ,'E' ,'F' ,'G' ,'H' ,'I' ,'J' ,'K' ,'L' ,'M' ,'N' ,'O' ,'P' ,'Q' ,'R' ,'S' ,'T' ,'U' ,'V' ,'W' ,'X' ,'Y','Z' };

inline void finish() {
	cout << -1 << endl;
	exit(0);
}

unsigned GetDigit(unsigned num) {
	return log10(num) + 1;
}

ll modinv(ll a, ll m) {
	ll b = m, u = 1, v = 0;
	while (b) {
		ll t = a / b;
		a -= t * b; swap(a, b);
		u -= t * v; swap(u, v);
	}
	u %= m;
	if (u < 0) u += m;
	return u;
}

class Mod {
public:
	static inline ll Add(ll a, ll b) {
		return (a + b) % MOD;
	}

	static inline ll Sub(ll a, ll b) {
		ll ans = (a - b) % MOD;
		return (ans < 0) ? (ans + MOD) : ans;
	}

	static inline ll Mul(ll a, ll b) {
		return (a * b) % MOD;
	}

	static inline ll Div(ll a, ll b) {
		return (a % MOD) * modinv(b, MOD) % MOD;
	}
};

class BitFlag {
private:
	const void Check(size_t n) const {
		if (n >= bits.size() || n < 0) {
			throw std::exception(("BitFlag OutOfRange size=" + to_string(bits.size()) + ", n = " + to_string(n) + ". You can use 0 <= n <= " + to_string(bits.size() - 1)).c_str());
		}
	}
	inline void BitPlus(size_t n) {
		Check(n);
		if (isTrue(n)) {
			Change(n);
			BitPlus(n + 1);
		}
		else {
			Change(n);
		}
	}
	inline void BitMinus(size_t n) {
		Check(n);
		if (isFalse(n)) {
			Change(n);
			BitMinus(n + 1);
		}
		else {
			Change(n);
		}
	}
public:
	vector<bool> bits;

public:
	BitFlag(int n, bool firstFlag = false) {
		bits.resize(n, firstFlag);
	}
	BitFlag(vector<bool> bits) {
		this->bits = bits;
	}

	inline void Change(size_t n) {
		Check(n);
		bits[n] = !bits[n];
	}

	inline void SetTrue(size_t n) {
		Check(n);
		bits[n] = true;
	}
	inline void SetFalse(size_t n) {
		Check(n);
		bits[n] = false;
	}

	inline void SetFlag(size_t n, bool flag) {
		Check(n);
		bits[n] = flag;
	}

	inline bool isTrue(size_t n) {
		Check(n);
		return bits[n];
	}
	inline bool isFalse(size_t n) {
		Check(n);
		return !bits[n];
	}

	inline size_t Size() const {
		return bits.size();
	}
	inline size_t Length() const {
		return bits.size();
	}

	void debug() {
		for (size_t i = bits.size() - 1;; --i) {
			cout << bits[i];
			if (i == 0) {
				cout << endl;
				return;
			}
		}
	}

	const bool& operator [](size_t n) const {
		Check(n);
		return bits[n];
	}

	BitFlag& operator ++() {
		BitPlus(0);
		return *this;
	}
	BitFlag& operator --() {
		BitMinus(0);
		return *this;
	}
	BitFlag& operator ++(int) {
		BitFlag bf = *this;
		--(*this);
		return bf;
	}

	BitFlag& operator --(int) {
		BitFlag bf = *this;
		++(*this);
		return bf;
	}
};

template <typename T>
inline void debug(vector<T> v) {
	cout << "[";
	for (ll i = 0; i < v.size() - 1; ++i) {
		cout << v[i] << ", ";
	}
	cout << v[v.size() - 1] << "]" << endl;
}

void Main();
inline void DebugMain() {
	while (true) {
		Main();
	}
}

int main() {
	cin.tie(nullptr);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(15);

	bool debug = false;
	if (debug) {
		cout << "\x1b[41m" << "Debug Mode " << endl;
	}
	(debug) ? DebugMain() : Main();
	return 0;
}

class man
{
public:
	int A;
	vector<pii> X;
	bool HeIsTrue;
private:
	
};

inline void Main() {
		ll X, Y, N;
		vector<ll> A;
		ll M1, D1, M2, D2;
		ll ans;
		ll sum=0,count =0;
		string S;
		string S2;
		int b[60];
		bool flag = false;
	
		cin >> X >> Y;
		
		if (1 != X && 1 != Y) {
			cout << 1;
		}else if (2 != X && 2 != Y) {
			cout << 2;
		}
		else if (3 != X && 3 != Y) {
			cout << 3;
		}
		
		
}



Compiler output:
a.cc: In member function 'const void BitFlag::Check(size_t) const':
a.cc:83:191: error: no matching function for call to 'std::exception::exception(const char*)'
   83 |                         throw std::exception(("BitFlag OutOfRange size=" + to_string(bits.size()) + ", n = " + to_string(n) + ". You can use 0 <= n <= " + to_string(bits.size() - 1)).c_str());
      |                                                                                                                                                                                               ^
In file included from /usr/include/c++/14/exception:36,
                 from /usr/include/c++/14/ios:41,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/c++/14/bits/exception.h:67:5: note: candidate: 'constexpr std::exception::exception(std::exception&&)'
   67 |     exception(exception&&) = default;
      |     ^~~~~~~~~
/usr/include/c++/14/bits/exception.h:67:15: note:   no known conversion for argument 1 from 'const char*' to 'std::exception&&'
   67 |     exception(exception&&) = default;
      |               ^~~~~~~~~~~
/usr/include/c++/14/bits/exception.h:65:5: note: candidate: 'constexpr std::exception::exception(const std::exception&)'
   65 |     exception(const exception&) = default;
      |     ^~~~~~~~~
/usr/include/c++/14/bits/exception.h:65:15: note:   no known conversion for argument 1 from 'const char*' to 'const std::exception&'
   65 |     exception(const exception&) = default;
      |               ^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/exception.h:62:5: note: candidate: 'std::exception::exception()'
   62 |     exception() _GLIBCXX_NOTHROW { }
      |     ^~~~~~~~~
/usr/include/c++/14/bits/exception.h:62:5: note:   candidate expects 0 arguments, 1 provided
a.cc: In member function 'const bool& BitFlag::operator[](size_t) const':
a.cc:164:30: warning: returning reference to temporary [-Wreturn-local-addr]
  164 |                 return bits[n];
      |                        ~~~~~~^
a.cc: In member function 'BitFlag& BitFlag::operator++(int)':
a.cc:178:24: warning: reference to local variable 'bf' returned [-Wreturn-local-addr]
  178 |                 return bf;
      |                        ^~
a.cc:176:25: note: declared here
  176 |                 BitFlag bf = *this;
      |                         ^~
a.cc: In member function 'BitFlag& BitFlag::operator--(int)':
a.cc:184:24: warning: reference to local variable 'bf' returned [-Wreturn-local-addr]
  184 |                 return bf;
      |                        ^~
a.cc:182:25: note: declared here
  182 |                 BitFlag bf = *this;
      |                         ^~