Language: C++

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

using ll=long long;
#define rng(i,l,r) for(int i=int(l);i<int(r);i++)
#define rep(i,r) rng(i,0,r)
#define rrng(i,l,r) for(int i=int(r)-1;i>=int(l);i--)
#define rrep(i,r) rrng(i,0,r)
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define mt make_tuple
#define F first
#define S second
#define bg begin()
#define ed end()
#define all(x) x.bg,x.ed
#define si(x) int(x.size())
#define inf INT_MAX/2-100
#define infl LLONG_MAX/3
#ifdef LOCAL
#define dmp(x) cerr<<__LINE__<<' '<<#x<<' '<<x<<endl
#else
#define dmp(x) void(0)
#endif

template<class t,class u>bool chmax(t&a,u b){if(a<b)a=b;return a<b;}
template<class t,class u>bool chmin(t&a,u b){if(b<a)a=b;return b<a;}

template<class t>using vc=vector<t>;
template<class t>using vvc=vector<vector<t>>;

using pi=pair<int,int>;
using pl=pair<ll,ll>;
using vi=vc<int>;
using vl=vc<ll>;


ll readl(void){
	ll x;
	cin>>x;
	return x;
}
int readi(void){
	int x;
	cin>>x;
	return x;
}

string readstr(){
	string s;
	cin>>s;
	return s;
}
vi readvi(int n,int off=0){
	vi v(n);
	rep(i,n)v[i]=readi(),v[i]+=off;
	return v;
}

vl readvl(int n,int off=0){
	vl v(n);
	rep(i,n)v[i]=readl(),v[i]+=off;
	return v;
}

template<class t>
void print(t x,int suc=1){
	cout<<x;
	if(suc==1)cout<<"\n";
	if(suc==2)cout<<" ";
}

template<class t>
void print(const vc<t>&v,int suc=1){
	rep(i,si(v))print(v[i],i==int(si(v))-1?1:suc);
}

template<class t>
bool inc(t a,t b,t c){
	return !(c<b||b<a);
}

template<class t>
void compress(vc<t>&v){
	sort(all(v));
	v.erase(unique(all(v)),v.ed);
}

template<class t>
int lwb(const vc<t>&v,const t&a){
	return lower_bound(all(v),a)-v.bg;
}

template<class t>
struct Compress{
	vc<t>v;
	Compress()=default;
	Compress(const vc<t>&x){
		add(x);
	}
	Compress(const initializer_list<vc<t> >&x){
		for(auto &p:x)add(p);
	}
	void add(const t&x){
		v.eb(x);
	}
	void add(const vc<t>&x){
		copy(all(x),back_inserter(v));
	}
	void build(){
		compress(v);
	}
	int get(const t&x)const{
		return lwb(v,x);
	}
	vc<t>get(const vc<t>&x)const{
		vc<t>res(x);
		for(auto &p:res)p=get(p);
		return res;
	}
	const t &operator[](int x)const{
		return v[x];
	}
	int size(){
		return v.size();
	}
};
void Yes(bool ex=true){
	cout<<"Yes\n";
	if(ex)exit(0);
}
void YES(bool ex=true){
	cout<<"YES\n";
	if(ex)exit(0);
}
void No(bool ex=true){
	cout<<"No\n";
	if(ex)exit(0);
}
void NO(bool ex=true){
	cout<<"NO\n";
	if(ex)exit(0);
}
void orYes(bool x,bool ex=true){
	if(x)Yes(ex);
	else No(ex);
}
void orYES(bool x,bool ex=true){
	if(x)YES(ex);
	else NO(ex);
}
void Possible(bool ex=true){
	cout<<"Possible\n";
	if(ex)exit(0);
}
void POSSIBLE(bool ex=true){
	cout<<"POSSIBLE\n";
	if(ex)exit(0);
}
void Impossible(bool ex=true){
	cout<<"Impossible\n";
	if(ex)exit(0);
}
void IMPOSSIBLE(bool ex=true){
	cout<<"IMPOSSIBLE\n";
	if(ex)exit(0);
}
void orPossible(bool x,bool ex=true){
	if(x)Possible(ex);
	else Impossible(ex);
}
void orPOSSIBLE(bool x,bool ex=true){
	if(x)POSSIBLE(ex);
	else IMPOSSIBLE(ex);
}

using uint=unsigned;
using ull=unsigned long long; 

template<uint const& MOD>
struct Modular{
	static constexpr uint const &mod=MOD;
	uint v;
	Modular(long long x=0){c(x%mod+mod);}
	Modular& c(uint x){
		v=x<mod?x:x-mod;
		return *this;
	}
	Modular pow(int k)const{
		Modular res(1),tmp(v);
		while(k){
			if(k&1)res*=tmp;
			tmp*=tmp;
			k>>=1;
		}
		return res;
	}

	Modular inv()const{return pow(mod-2);}
	Modular operator-()const{return Modular(mod-v);}

	Modular& operator+=(const Modular &x){return c(v+x.v);}
	Modular& operator-=(const Modular &x){return c(v+mod-x.v);}
	Modular& operator*=(const Modular &x){v=ull(v)*x.v%mod;return *this;}
	Modular& operator/=(const Modular &x){return *this*=x.inv();}

	Modular operator+(const Modular &x)const{return Modular(*this)+=x;}
	Modular operator-(const Modular &x)const{return Modular(*this)-=x;}
	Modular operator*(const Modular &x)const{return Modular(*this)*=x;}
	Modular operator/(const Modular &x)const{return Modular(*this)/=x;}

	friend Modular operator+(long long x,const Modular &y){return Modular(x)+y;}
	friend Modular operator-(long long x,const Modular &y){return Modular(x)-y;}
	friend Modular operator*(long long x,const Modular &y){return Modular(x)*y;}
	friend Modular operator/(long long x,const Modular &y){return Modular(x)/y;}

	friend ostream& operator<<(ostream&os,const Modular&x){
		return os<<x.v;
	}
	friend istream& operator>>(istream&is,Modular&x){
		long long p;
		is>>p;
		x=Modular(p);
		return is;
	}
	bool operator==(const Modular &x)const{return v==x.v;}
	bool operator!=(const Modular &x)const{return v!=x.v;}
	bool operator<(const Modular &x)const{return v<x.v;}
	explicit operator bool()const{return v;}
};

//uint MODULAR=998244353;
uint MODULAR=1000000007;
using Mint=Modular<MODULAR>; 

vector<Mint>fact,finv,invs;
void Initfact(int n=(1<<21)+10){
	fact.resize(n+1),finv.resize(n+1),invs.resize(n+1);
	fact[0]=1;
	for(int i=1;i<=n;i++){
		fact[i]=fact[i-1]*i;
	}
	finv[n]=fact[n].inv();
	for(int i=n-1;i>=0;i--){
		finv[i]=finv[i+1]*(i+1);
	}
	invs[0]=1;
	for(int i=0;i<=n;i++){
		invs[i]=finv[i]*fact[i-1];
	}
}

Mint comb(int n,int k){
	return fact[n]*finv[n-k]*finv[k];
}

struct data{
	int a,b,c,d;
};
void ps(int a,int b,int c){
	cout<<"+ "<<a<<' '<<b<<' '<<c<<endl;
}
void da(int a,int b,int c){
	cout<<"< "<<a<<' '<<b<<' '<<c<<endl;
}
int n=30,k=3;
vector<data> ans;
vi bs,as;
int main(void){
	cin.tie(0);
	ios::sync_with_stdio(0);
	ans.pb(data{1,2,1,k++});
	ans.pb(data{0,3,1,1});
	ans.pb(data{0,3,0,0});
	for(int i=1;i<n;i++){
		ans.pb(data{0,k-1,k,k});
		ans.pb(data{0,k,k,k});
		k++;
	}
	int x=k-1;
	for(int i=n-1;i>=0;i--,x--){
		for(auto &j:bs)ans.pb(data{0,j,x,x});
		ans.pb(data{1,x,1,k++});
		int r=k-1;
		for(int j=1;j<=i;j++){
			ans.pb(data{0,k-1,k,k});
			ans.pb(data{0,k,k,k});
			k++;
		}
		bs.pb(k-1);
		ans.pb(data{0,r,k,k});
		k++;
		r=k-1;
		for(int j=1;j<n;j++){
			ans.pb(data{0,k-1,k,k});
			ans.pb(data{0,k,k,k});
			k++;
		}
		int y=k-1;
		as.clear();
		for(int j=n-1;j>=0;j--,y--){
			for(auto &l:as)ans.pb(data{0,l,y,y});
			ans.pb(data{1,y,0,k++});
			for(int l=1;l<=j;l++){
				ans.pb(data{0,k-1,k,k});
				ans.pb(data{0,k,k,k});
				k++;
			}
			as.pb(k-1);
		}
		for(auto &j:as){
			ans.pb(data{0,j,k,k});
		}
		k++;
		for(int j=1;j<=i;j++){
			ans.pb(data{0,k-1,k,k});
			ans.pb(data{0,k,k,k});
			k++;
		}
		ans.pb(data{0,k-1,2,2});
	}
	print(si(ans));
	for(auto &i:ans){
		if(i.a==0)ps(i.b,i.c,i.d);
		else da(i.b,i.c,i.d);
	}
}


Compiler output:
a.cc:268:12: error: template argument 1 is invalid
  268 | vector<data> ans;
      |            ^
a.cc:268:12: error: template argument 2 is invalid
a.cc: In function 'int main()':
a.cc:9:12: error: request for member 'push_back' in 'ans', which is of non-class type 'int'
    9 | #define pb push_back
      |            ^~~~~~~~~
a.cc:273:13: note: in expansion of macro 'pb'
  273 |         ans.pb(data{1,2,1,k++});
      |             ^~
a.cc:273:16: error: reference to 'data' is ambiguous
  273 |         ans.pb(data{1,2,1,k++});
      |                ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:258:8: note:                 'struct data'
  258 | struct data{
      |        ^~~~
a.cc:9:12: error: request for member 'push_back' in 'ans', which is of non-class type 'int'
    9 | #define pb push_back
      |            ^~~~~~~~~
a.cc:274:13: note: in expansion of macro 'pb'
  274 |         ans.pb(data{0,3,1,1});
      |             ^~
a.cc:274:16: error: reference to 'data' is ambiguous
  274 |         ans.pb(data{0,3,1,1});
      |                ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:258:8: note:                 'struct data'
  258 | struct data{
      |        ^~~~
a.cc:9:12: error: request for member 'push_back' in 'ans', which is of non-class type 'int'
    9 | #define pb push_back
      |            ^~~~~~~~~
a.cc:275:13: note: in expansion of macro 'pb'
  275 |         ans.pb(data{0,3,0,0});
      |             ^~
a.cc:275:16: error: reference to 'data' is ambiguous
  275 |         ans.pb(data{0,3,0,0});
      |                ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:258:8: note:                 'struct data'
  258 | struct data{
      |        ^~~~
a.cc:9:12: error: request for member 'push_back' in 'ans', which is of non-class type 'int'
    9 | #define pb push_back
      |            ^~~~~~~~~
a.cc:277:21: note: in expansion of macro 'pb'
  277 |                 ans.pb(data{0,k-1,k,k});
      |                     ^~
a.cc:277:24: error: reference to 'data' is ambiguous
  277 |                 ans.pb(data{0,k-1,k,k});
      |                        ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:258:8: note:                 'struct data'
  258 | struct data{
      |        ^~~~
a.cc:9:12: error: request for member 'push_back' in 'ans', which is of non-class type 'int'
    9 | #define pb push_back
      |            ^~~~~~~~~
a.cc:278:21: note: in expansion of macro 'pb'
  278 |                 ans.pb(data{0,k,k,k});
      |                     ^~
a.cc:278:24: error: reference to 'data' is ambiguous
  278 |                 ans.pb(data{0,k,k,k});
      |                        ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:258:8: note:                 'struct data'
  258 | struct data{
      |        ^~~~
a.cc:9:12: error: request for member 'push_back' in 'ans', which is of non-class type 'int'
    9 | #define pb push_back
      |            ^~~~~~~~~
a.cc:283:36: note: in expansion of macro 'pb'
  283 |                 for(auto &j:bs)ans.pb(data{0,j,x,x});
      |                                    ^~
a.cc:283:39: error: reference to 'data' is ambiguous
  283 |                 for(auto &j:bs)ans.pb(data{0,j,x,x});
      |                                       ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:258:8: note:                 'struct data'
  258 | struct data{
      |        ^~~~
a.cc:9:12: error: request for member 'push_back' in 'ans', which is of non-class type 'int'
    9 | #define pb push_back
      |            ^~~~~~~~~
a.cc:284:21: note: in expansion of macro 'pb'
  284 |                 ans.pb(data{1,x,1,k++});
      |                     ^~
a.cc:284:24: error: reference to 'data' is ambiguous
  284 |                 ans.pb(data{1,x,1,k++});
      |                        ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Contai