Skip to content

Commit

Permalink
Create ehab_and_2_operation_task.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
puzzlecollector authored Jan 21, 2019
1 parent cc4aa1d commit 01244ec
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions ehab_and_2_operation_task.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
int a[2005];
bool strictly_increasing(int *k,int n){
for (int i = 1; i <= n-1; i++){
if (k[i] >= k[i+1]) return false;
}
return true;
}
struct operation{
int type;
int idx;
int x;
operation(int t,int i,int _x): type(t), idx(i), x(_x){}
};
int main(int argc,char **argv){
int n;
scanf("%d",&n);
for (int i = 1; i <= n; i++){
scanf("%d",a+i);
}
printf("%d\n1 %d 500000\n",n+1,n);
for (int i = 1; i <= n; i++){
printf("2 %d %d\n",i,a[i]+500000-i);
}
return 0;
}

0 comments on commit 01244ec

Please sign in to comment.