-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create ehab_and_2_operation_task.cpp
- Loading branch information
1 parent
cc4aa1d
commit 01244ec
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |