Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

禁止套娃!! #59

Merged
merged 2 commits into from
Feb 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Sallee1/README.md
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,字符数能更少
Binary file added Sallee1/a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions Sallee1/a.ps1
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
Loading