正文
增加 11 行删除 11 行
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474818 行未改动67686970717273747576[graph_editor](https://csacademy.com/app/graph_editor/)## 绘制线段树的步骤:### 1.确定要画的线段树的长度,并输入到以下程序:> 我们强烈谴责输入$>64$的数使电脑极其卡顿的人!```cpp#include <bits/stdc++.h>#define eggy using#define party namespace#define ymzx (n>64)eggy party std;struct damn{int l,r;};struct damn tr[4000010];void bd(int l, int r, int x);void print(int x);void cyy_wait_ms(int ms);int n;int main(){scanf("%d",&n);system("CLS");bd(1,n,1);print(1);printf("\n\n\n");if (n > 30){printf("我给你足足%d.%d秒复制!(我己经将输入的n清除,可放心一拉到顶)\n\n\n",n/10,n%10);cyy_wait_ms(n*100);}else{printf("我给你足足3.0秒复制!(我己经将输入的n清除,可放心一拉到顶)\n\n\n");cyy_wait_ms(3000);}system("start https://csacademy.com/app/graph_editor/");return 0;}void bd(int l, int r, int x){tr[x].l = l; tr[x].r = r;if (l == r){return;}int mid = (l+r) >> 1;18 行未改动### 2.打开刚才提供的[graph_editor](https://csacademy.com/app/graph_editor/),将刚才代码输出的数据输入进左上角的`Graph Data:`区域(卡顿警告!)### 3.按照这个步骤点击:### 4.生成漂亮的线段树警告:多次绘制请重新打开[graph_editor](https://csacademy.com/app/graph_editor/),否则`1-2`节点可能会被识别为根节点12345678910111213141516171819202122232425262728293031323334353637383940414243444546474818 行未改动67686970717273747576[graph_editor](https://csacademy.com/app/graph_editor/)## 绘制线段树的步骤:### 1.确定要画的线段树的长度,并输入到以下程序:> 我们强烈谴责输入$>64$的数使电脑极其卡顿的人!```cpp#include <bits/stdc++.h>#define eggy using#define party namespace#define ymzx (n>64)eggy party std;struct damn{int l,r;};struct damn tr[4000010];void bd(int l, int r, int x);void print(int x);void cyy_wait_ms(int ms);int n;int main(){scanf("%d",&n);system("CLS");bd(1,n,1);print(1);printf("\n\n\n");if (n > 30){printf("我给你足足%d.%d秒复制!(我己经将输入的n清除,可放心一拉到顶)\n\n\n",n/10,n%10);cyy_wait_ms(n*100);}else{printf("我给你足足3.0秒复制!(我己经将输入的n清除,可放心一拉到顶)\n\n\n");cyy_wait_ms(3000);}system("start https://csacademy.com/app/graph_editor/");return 0;}void bd(int l, int r, int x){tr[x].l = l; tr[x].r = r;if (l == r){return;}int mid = (l+r) >> 1;18 行未改动### 2.打开刚才提供的[graph_editor](https://csacademy.com/app/graph_editor/),将刚才代码输出的数据输入进左上角的`Graph Data:`区域(卡顿警告!)### 3.按照这个步骤点击:### 4.生成漂亮的线段树警告:多次绘制请重新打开[graph_editor](https://csacademy.com/app/graph_editor/),否则`1-2`节点可能会被识别为根节点