标签:+= make class ret n+1 long push problems --
今天一如既往地不会呢
一共n个数
今天才知道,其实每次把当前的数进行取余,然后加上当前数的前一位就能严格单调,,
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define iinf 0x3f3f3f3f
#define linf (1ll<<60)
#define eps 1e-8
#define maxn 1000010
#define maxe 1000010
#define cl(x) memset(x,0,sizeof(x))
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define drep(i,a,b) for(i=a;i>=b;i--)
#define em(x) emplace(x)
#define emb(x) emplace_back(x)
#define emf(x) emplace_front(x)
#define fi first
#define se second
#define de(x) cerr<<#x<<" = "<<x<<endl
#define __i __int128
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
ll read(ll x=0)
{
ll c, f(1);
for(c=getchar();!isdigit(c);c=getchar())if(c==‘-‘)f=-f;
for(;isdigit(c);c=getchar())x=x*10+c-0x30;
return f*x;
}
ll n , k, m ;
int mod = 5e5+10;
int ar[200010];
int main()
{
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
// int i ;
cin >>n;
for(int i=1;i<=n;i++){
cin >>ar[i];ar[i]+=mod;
}
cout<<n+1<<endl;
cout<<1 <<" "<<n<<" "<<mod<<endl;
for(int i=1 ;i<=n;i++){
cout<<2 << " "<<i<<" "<<ar[i]-i+1<<endl;
}
return 0;
}
标签:+= make class ret n+1 long push problems --
原文地址:https://www.cnblogs.com/gaohaoy/p/12563329.html