- My Competitive Programming (CP) Sublime snippets (templates) and Stress testing template
-
Install Homebrew (Ignore if already installed) using instruction given on the website.
-
Install GCC :
- Install GCC with the help of homebrew using command
brew install gcc - Move to bin folder where g++-x (Eg: g++-11) is present using command
cd /usr/local/bin(Now you can check g++-x by using commandls) - Rename g++-11 to g++ using command
ln -s g++-11 g++(Now you can check g++ version using commandg++ --version) (It should show gcc version that we have installed)
- Install GCC with the help of homebrew using command
-
Precompile headers :
- To precompile bits/stdc++.h, move to bits/ folder. Find the file using command
sudo find /usr -name stdc++.h - To precompile header, use command
g++ -DLOCAL -std=c++17 stdc++.h(New file stdc++.h.gch will be generetad) (Use commandlsto check it) - To precompile pb_ds/assoc_container.hpp, move to pbds folder. Find the file using command
sudo find /usr -name assoc_container.hpp - To precompile header, use command
g++ -DLOCAL -std=c++17 assoc_container.hpp(Now file assoc_container.hpp.gch will be generated) (Use commandlsto check it)
- To precompile bits/stdc++.h, move to bits/ folder. Find the file using command
-
Install Sublime from website
-
Sublime setup :
- Copy and paste sublime snippets to
Sublime Text/Packages/Usersfolder. - Install Origami package from package manager of sublime
- Use already saved origami CP layout from
View->Origami->Window->New->From Saved Layout - Install PackageResourceViewer package in sublime from package manager if not already installed
- Extract origami package in sublime using PackageResourceViewer package.
- Copy origami.py file and paste it into origami.py file of extracted origami.py file and save it.
- Checkout /snippets/Default (OSX).sublime-keymap to use origami shortcuts
- Copy and paste sublime snippets to
-
Now use C++17 CP Intel MAC build to build your c++ program :)
-
Install Homebrew (Ignore if already installed) using instruction given on the website.
-
Install GCC :
- Install GCC with the help of homebrew using command
brew install gcc - Move to bin folder where g++-x (Eg: g++-11) is present using command
cd /opt/homebrew/bin(Now you can check g++-x by using commandls) - Rename g++-11 to g++ using command
ln -s g++-11 g++(Now you can check g++ version using commandg++ --version) (It should show gcc version that we have installed)
- Install GCC with the help of homebrew using command
-
Precompile headers :
- To precompile bits/stdc++.h, move to bits/ folder. Find the file using command
sudo find /opt -name stdc++.h - To precompile header, use command
g++ -DLOCAL -std=c++17 stdc++.h(New file stdc++.h.gch will be generetad) (Use commandlsto check it) - To precompile pb_ds/assoc_container.hpp, move to pbds folder. Find the file using command
sudo find /opt -name assoc_container.hpp - To precompile header, use command
g++ -DLOCAL -std=c++17 assoc_container.hpp(Now file assoc_container.hpp.gch will be generated) (Use commandlsto check it)
- To precompile bits/stdc++.h, move to bits/ folder. Find the file using command
-
Install Sublime from website
-
Sublime setup :
- Copy and paste all sublime snippets to
Sublime Text 3/Packages/Usersfolder. - Install Origami package from package manager of sublime
- Use already saved origami CP layout from
View->Origami->Window->New->From Saved Layout - Install PackageResourceViewer package in sublime from package manager if not already installed
- Extract origami package in sublime using PackageResourceViewer package.
- Copy origami.py file and paste it into origami.py file of extracted origami.py file and save it.
- Checkout /snippets/Default (OSX).sublime-keymap to use origami shortcuts
- Copy and paste all sublime snippets to
-
Now use c++ 17 CP (Silicon chip MAC) build to build your c++ program :)