acm with ACL(atcoder library)


安裝

使用sublime作為acm編輯器那必然少不了神級插件FOC(Fast Olympic Coding plugin for Sublime Text 3)
安裝地址: CppFastOlympicCoding - Packages - Package Control

快捷鍵:

  • ctrl+b (OSX) ctrl+alt+b (Linux + Win) compile and run
  • ctrl+enter new test
  • ctrl+c (OSX) ctrl+x (Linux + Win) kill process
  • ctrl+shift+b (OSX) run with debugger
  • ctrl+d delete test
  • ctrl+super+up/ctrl+super+down (OSX) ctrl+shift+up/ctrl+shift+down (Linux + Win) swap tests
  • cmd+k, cmd+p (OSX) ctrl+k, ctrl+p (Linux + Win) close/open right panel

ACL的安裝方式如下

git clone https://github.com/atcoder/ac-library acm_with_acl

然后就可以在acm_with_acl這個文件夾中寫代碼了

當然這是cpp的ACL,以下是其他語言的ACL

之后對FOC插件進行配置
ctrl+shift+p,之后輸入FastOlympicCoding: Open Settings就可以進行配置了
修改FOC的編譯命令,使其編譯的時候可以支持ACL

{
		"run_settings": [
		{
			"name": "C++",
			"extensions": ["cpp"],
			"compile_cmd": "g++ \"{source_file}\" -std=c++14 -o \"{file_name}\" -I .",
			"run_cmd": "\"{source_file_dir}\\{file_name}.exe\" {args} -debug",

			"lint_compile_cmd": "g++ -std=gnu++11 \"{source_file}\" -I \"{source_file_dir}\""
		}
	],
}

當然ACL的頭文件只有atcoder可以使用,想要在其他oj使用ACL就需要ACL官方的腳本
使用方式如下

python expander.py <filename>.cpp

運行成功后文件夾內會生成一個cpp文件combined.cpp
復制里面的內容就可以在其他oj提交了


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM