generated from InvoluteHell/Scoring
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
28 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,25 @@ | ||
# 禁止套娃 | ||
|
||
## 禁止禁止套娃 | ||
|
||
### 禁止禁止禁止套娃 | ||
|
||
#### 禁止禁止禁止禁止套娃 | ||
|
||
##### 禁止禁止禁止禁止禁止套娃 | ||
|
||
###### 禁止禁止禁止禁止禁止禁止套娃 | ||
|
||
创建一个指向自己的符号链接,然后用dir命令递归展开,BOOM | ||
|
||
实际上因为cmd的路径有260个字符限制,所以展开到128层就停止了 | ||
|
||
但是如果有两个指向自己的符号链接呢 | ||
|
||
理论上就能展开出$\sum_{k=0}^{n}C_{n}^{k} = 2^n$ 条路径 | ||
|
||
如果n取128,则总共会展开出$3.4028*10^{38}$条路径 | ||
|
||
当然有点慢就是了,我电脑跑了一个半小时才达到4GB的题目要求 | ||
|
||
另外要不是因为CMD只能存储一行命令输出,只能用PWSH调用CMD以存储命令输出,如果只用CMD,字符数能更少 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,3 @@ | ||
CMD /CMKLINK /D C . | ||
CMD /CMKLINK /D M . | ||
$D = CMD /CDIR /S |