Stable marriage problem: Difference between revisions
Content added Content deleted
Simple9371 (talk | contribs) (→{{header|Batch File}}: Better code.) |
Simple9371 (talk | contribs) m (→{{header|Batch File}}: Spacing...) |
||
Line 277: | Line 277: | ||
:match_loop |
:match_loop |
||
if "%free_men%"=="" goto :EOF |
if "%free_men%"=="" goto :EOF |
||
for /f "tokens=1* delims= " %%m in ("%free_men%") do ( |
for /f "tokens=1* delims= " %%m in ("%free_men%") do ( |
||
rem get woman not yet proposed to, but if man's tries exceeds the number |
rem get woman not yet proposed to, but if man's tries exceeds the number |
||
Line 312: | Line 311: | ||
) |
) |
||
goto :match_loop |
goto :match_loop |
||
:: Output the Couples |
:: Output the Couples |