VS Code Setting (Live input output) to make competitive programming easy and program analysis !
This tutorial is for linux (debian based) only
If you are a windows user then check this out Setup VS Code for windows
This is a .json file which will help you to run your cpp file with one click or shortcut.
In this case , you don't need to write input in the command line or write fopen / close stuffs , programme will take input from a file (input.txt) automatically and give the output in another file (output.txt).
You can also find the programme runtime status which will help you to calculate execution time as well as memory usage and many more !
pre-requirements :
sudo apt install time
Note : You just need to do these things only for the first time of your workspace!
Split screen in 3 sections
input.txt
and save it in the same folderoutput.txt
and save it in the same folderGo to Configure Default Build Task...
In Menu bar
task.json
{ link is here } file into your task.json
filectrl+shift+b
Note : Make sure your mouse cursor is clicked or focused on the cpp file editor while you are running your code.
tasks(extra).json
file Link
task.json
files for :
Python :
Java :
Dart :
Go :
Note : Here, I have merged all the files which includes tasks.json file for Python, C, C++, Java and Dart for both Windows and Linux! Here is the Link
This one is made for my personal usage, you can add functions as you wish and edit my name and doc.