Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <map>
#include <vector>
#include <string>
#include <set>
using namespace std;
template <typename T, typename U>
ostream& operator<<(ostream& os, const pair<T, U> p) {
#include <iostream>
#include <map>
#include <vector>
#include <string>
using namespace std;
template <typename T, typename U>
ostream& operator<<(ostream& os, const pair<T, U> p) {
os << '(' << p.first << ':' << p.second << ')';
#include <memory>
using namespace std;
template <typename T, typename U>
ostream& operator<<(ostream& os, const pair<T, U> p) {
os << '(' << p.first << ',' << p.second << ')';
return os;
}