当前位置: 代码迷 >> 综合 >> Codeforces Round #525 (Div. 2)C. Ehab and a 2-operation task(构造思维)
  详细解决方案

Codeforces Round #525 (Div. 2)C. Ehab and a 2-operation task(构造思维)

热度:94   发布时间:2023-11-15 13:38:33.0

题目链接:http://codeforces.com/contest/1088/problem/C

#include<bits/stdc++.h>
using namespace std;#define debug puts("YES");
#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)
#define ll  __int64#define lrt int l,int r,int rt
#define lson l,mid,rt<<1
#define rson mid+1,r,rt<<1|1
#define root l,r,rt
#define mst(a,b) memset((a),(b),sizeof(a))#define pii pair<ll,ll>
#define mk(x,y) make_pair(x,y)const int maxn =1e5+5;
const int maxm=250005;
const int mod=1e9+7;
const int ub=1e6;
ll powmod(ll x,ll y){ll t; for(t=1;y;y>>=1,x=x*x%mod) if(y&1) t=t*x%mod; return t;}
ll gcd(ll x,ll y){return y?gcd(y,x%y):x;}int n,a[maxn];
int main()
{cin>>n;rep(i,1,n+1) cin>>a[i];cout<<n+1<<endl;cout<<2<<" "<<n<<" "<<1<<endl;cout<<1<<" "<<n<<" "<<2*n<<endl;rep(i,1,n) cout<<2<<" "<<i<<" "<<2*n-i<<endl;return 0;
}

 

  相关解决方案