-
Notifications
You must be signed in to change notification settings - Fork 0
/
new.bat
75 lines (61 loc) · 898 Bytes
/
new.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@echo off
cls
if %1 leq 1000 (
goto hun
)
if %1 leq 10000 (
goto tho
)
if %1 leq 100000 (
goto mil
)
:hun
pushd hundred
if EXIST uva%1 (
goto exist
)
mkdir uva%1
popd
type template > hundred\uva%1\uva%1.cpp
echo.>hundred\uva%1\uva%1.in
echo.>hundred\uva%1\uva%1.out
goto end
:tho
pushd thousand
if EXIST uva%1 (
goto exist
)
mkdir uva%1
popd
type template > thousand\uva%1\uva%1.cpp
echo.>thousand\uva%1\uva%1.in
echo.>thousand\uva%1\uva%1.out
goto end
:mil
pushd million
if EXIST uva%1 (
goto exist
)
mkdir uva%1
popd
type template > million\uva%1\uva%1.cpp
echo.>million\uva%1\uva%1.in
echo.>million\uva%1\uva%1.out
goto end
:exist
echo uva%1 already exist
popd
goto finish
:end
echo uva%1 Created
g++ add.cpp -o add.exe
if %ERRORLEVEL% EQU 0 (
add.exe %1
)
echo finsh add to README.md
g++ arrange.cpp -o arrange.exe
if %ERRORLEVEL% EQU 0 (
arrange.exe
)
echo finish
:finish