『楼 主』:
 [原创]**********希尔排序************
 
使用 LLM 解释/回答一下
  
@echo off 
setlocal enabledelayedexpansion 
:::::::::::::::::::::::::::::::::::::::::Shell Sort::::::::::::::::::::::::::::::::::::::::: 
 
 
::::::::Get Original Numbers:::::::: 
echo Please input some numbers separated from "," , like 2007,9,14,88: 
set /a s=0 
set /p str= 
set /a len=0 
set /a nx=0 
:c 
call set word=%%str:~%len%,1%% 
set /a len+=1 
if "%word%" equ "," (set /a nx+=1 & call :e) 
if not "%word%" equ "" (goto :c) 
set /a nx+=1 
call :e 
goto :o 
:e 
set /a sn=%len%-%s%-1 
call set n%nx%=%%str:~%s%,%sn%%% 
set /a s=%len% 
goto :eof 
::::::::Get Original Numbers:::::::: 
 
::::::::Deal With Numbers:::::::: 
:o 
set /a maxinc=(%nx%-1)/2 
set /a num=%nx%+1+%maxinc% 
for /l %%a in (%nx%,-1,1) do (set /a kk=%maxinc%+%%a & set /a n!kk!=!n%%a!) 
for /l %%b in (1,1,%maxinc%) do ( 
(set /a n%%b=-214748320) 
) 
set /a var=1 
:n 
if %var% equ 1 (set /a m%var%=%maxinc%) else (set /a var2=%var%-1 & call :x) 
set /a i=!m%var%!+%maxinc%+1 
if !m%var%! equ 0 (goto :p) else (goto :m) 
:x 
set /a m%var%=!m%var2%!/2 
goto :eof 
:m 
set /a temporary=!n%i%! 
set /a j=%i%-!m%var%! 
:j 
if %temporary% lss !n%j%! (goto :ch)  
goto :z 
:ch 
set /a k=%j%+!m%var%! 
set /a n%k%=!n%j%! 
set /a j-=!m%var%! 
goto :j 
:z 
set /a k=%j%+!m%var%! 
set /a n%k%=%temporary% 
set /a i+=1 
if %i% lss %num% (goto :m) else (set /a var+=1 & goto :n)  
::::::::Deal With Numbers:::::::: 
 
::::::::Print The Result:::::::: 
:p 
set /a qi=%maxinc%+1 
set /a zhi=%nx%+%maxinc% 
for /l %%c in (%qi%,1,%zhi%) do (set str2=!str2!!n%%c! ) 
echo. 
echo The numbers after sorting are: 
echo !str2! 
echo. 
echo Press Any Key To Exit... 
pause>nul 
goto :eof 
::::::::Print The Result:::::::: 
 
 
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::s11ss 
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::2007-9-15 
 
    
 
  
 |