闲来无聊,于是写了个BAT,用于创建题目文件夹。
@echo off
echo ICPC Contest Folder Environment Maker
set /p dir_name="Please input the folder name:"
md %dir_name%
echo %dir_name% has been created
cd %dir_name%
md complied
echo Creating code files...
FOR %%F IN (A B C D E F G H I J K L M N) DO cd.>%%F.cpp
set /p py_files_num="Please input the number of python files:"
if %py_files_num% == 0 (
echo Python files whill not be created!
) else (
md Python
echo Creating python script files...
cd Python
FOR /l %%F IN (1, 1, %py_files_num%) DO cd.>test%%F.py
)
echo Created Successfully! Enjoy yourself ^-^
建议的vscode
配置:创建.vscode
文件夹,并创建settings.json
,写入内容:
注:此时编译的文件会集中写入./folder_name/complied/
目录下,避免乱七八糟的现象。
{
"files.associations": {
"iostream": "cpp",
"unordered_map": "cpp",
"utility": "cpp",
"ostream": "cpp",
"algorithm": "cpp",
"atomic": "cpp",
"bit": "cpp",
"charconv": "cpp",
"chrono": "cpp",
"compare": "cpp",
"deque": "cpp",
"format": "cpp",
"fstream": "cpp",
"functional": "cpp",
"future": "cpp",
"limits": "cpp",
"list": "cpp",
"memory": "cpp",
"random": "cpp",
"ratio": "cpp",
"regex": "cpp",
"thread": "cpp",
"tuple": "cpp",
"vector": "cpp",
"xhash": "cpp",
"xlocnum": "cpp",
"xloctime": "cpp",
"xmemory": "cpp",
"xstring": "cpp",
"xtree": "cpp",
"xutility": "cpp",
"system_error": "cpp",
"xlocbuf": "cpp",
"xlocmon": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"concepts": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"exception": "cpp",
"initializer_list": "cpp",
"ios": "cpp",
"iosfwd": "cpp",
"istream": "cpp",
"iterator": "cpp",
"new": "cpp",
"set": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"type_traits": "cpp",
"typeinfo": "cpp",
"xfacet": "cpp",
"xiosbase": "cpp",
"xlocale": "cpp",
"xlocinfo": "cpp",
"xstddef": "cpp",
"xtr1common": "cpp",
"string": "cpp",
"stack": "cpp",
"queue": "cpp",
"map": "cpp",
"iomanip": "cpp",
"*.rh": "cpp",
"complex": "cpp",
"condition_variable": "cpp",
"resumable": "cpp",
"forward_list": "cpp",
"mutex": "cpp",
"numeric": "cpp",
"optional": "cpp",
"sstream": "cpp",
"stop_token": "cpp",
"typeindex": "cpp",
"unordered_set": "cpp",
"valarray": "cpp",
"xlocmes": "cpp",
"array": "cpp",
"bitset": "cpp",
"cfenv": "cpp",
"cinttypes": "cpp",
"csetjmp": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cwctype": "cpp",
"coroutine": "cpp",
"locale": "cpp",
"scoped_allocator": "cpp"
},
"C_Cpp.errorSquiggles": "Enabled",
"code-runner.executorMap": {
"cpp": "cd $dir && g++ $fileName -o .\\complied\\$fileNameWithoutExt && .\\complied\\$fileNameWithoutExt",
}
}