LeetCode 0. Preparation
诶...碰到LeetCode这种没有数据范围/input/output的OJ很尴尬了...
一 Run C++ in Sublime Text 3 on MAC OSX:
0.官网下载 Sublime text 。MAC OS自带g++.(所以不用安装xcode/command line tools等)
1.点击Sublime菜单栏Tools->Build System->New build system
2.输入下面代码,并保存为 C++.sublime-build .
{ "cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}"], "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", "working_dir": "${file_path}", "selector": "source.c, source.c++", "variants": [ { "name": "Run", "cmd": ["bash", "-c", "g++ '${file}' -o '${file_path}/${file_base_name}' && open -a Terminal.app '${file_path}/${file_base_name}'"] } ] }
3.其实到此就可以了。附一段激活码。不过估计很快失效,就当是看我博客的福利好了。
BEGIN LICENSE ZYNGA INC. 50 User License EA7E-811825 927BA117 84C9300F 4A0CCBC4 34A56B44 985E4562 59F2B63B CCCFF92F 0E646B83 0FD6487D 1507AE29 9CC4F9F5 0A6F32E3 0343D868 C18E2CD5 27641A71 25475648 309705B3 E468DDC4 1B766A18 7952D28C E627DDBA 960A2153 69A2D98A C87C0607 45DC6049 8C04EC29 D18DFA40 442C680B 1342224D 44D90641 33A3B9F2 46AADB8F END LICENSE
4.屏蔽更新提醒,点这里。