This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
typedef long long ll; | |
typedef pair<int, int> pii; | |
#define FastIO ios::sync_with_stdio(false); cin.tie(0); | |
#define all(x) (x).begin(), (x).end() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
typedef double Tf; | |
typedef Tf Ti; // int/ll for exactness | |
const Tf EPS = 1e-7; | |
const Tf INF = 1e20; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# USAGE: (saves to FILENAME) | |
# ./wget_gdrive.sh FILEID FILENAME | |
# https://medium.com/@acpanjan/download-google-drive-files-using-wget-3c2c025a8b99 | |
# Copy the link for sharing: https://drive.google.com/file/d/1UibyVC_C2hoT_XEw15gPEwPW4yFyJFeOEA/view?usp=sharing | |
# Extract FILEID part: 1UibyVC_C2hoT_XEw15gPEwPW4yFyJFeOEA | |
# For small (<100MB) files: | |
# wget --no-check-certificate "https://docs.google.com/uc?export=download&id=$1" -O $2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
void read(int& x, int& y) { | |
cin >> x >> y; | |
cerr << "cc< " << x << " " << y << endl; | |
} | |
void write(int x, int y) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install -y software-properties-common | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo apt update | |
sudo apt install g++-8 -y | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 \ | |
--slave /usr/bin/g++ g++ /usr/bin/g++-8 \ | |
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-8 \ | |
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-8 \ | |
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-8 | |
sudo update-alternatives --config gcc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/***********USAGE******************** | |
* g++ -std=c++11 eval.cc -o eval * | |
* ./eval yor.crs yor.stu yor.sol * | |
*************************************/ | |
#include <bits/stdc++.h> | |
#include <exception> | |
using namespace std; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.fontFamily": "'Ubuntu Mono'", | |
"editor.fontSize": 14, | |
"workbench.colorTheme": "One Dark Pro", | |
"workbench.iconTheme": "vscode-icons", | |
"editor.insertSpaces": false, | |
"editor.detectIndentation": true, | |
"code-runner.executorMap": { | |
"c": "gcc -std=c11 $fullFileName && ./a.out", | |
"cpp": "g++ -std=c++14 $fullFileName && ./a.out", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
typedef double T; | |
const int N = 1e3 + 7; | |
const T INF = 1e18; | |
vector<int> g[N]; |