规定好了n+1个操作,正好够。
一开始没看见n+1还在想怎么用dp,问了耀辰才知道这么zz。。
zzzzzzzzzzzzzzzzzzzzz
http://codeforces.com/contest/1088/problem/C
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
int n;
scanf("%d", &n);
int tmp;
for (int i = 1; i <= n; ++i)
scanf("%d", &tmp);
cout << n+1 << '\n';
cout << 2 << ' ' << n << ' ' << 1 << '\n';
cout << 1 << ' ' << n << ' ' << 99991 << '\n';
for (int i = 1; i <= n - 1; ++i) {
cout << 2 << ' ' << i << ' ' << 99991-i+1 << '\n';
}
return 0;
}