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
/** | |
* Create a class that uses the builder pattern and only allows the 'send' method to be called only | |
* when both setUrl and setMethod have been called before it (in any order) | |
*/ | |
interface WithUrl { | |
getUrl(): string; | |
setMethod(method: string): ReadyToSend; | |
} |
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 <cstdio> | |
#define min(a, b) a < b ? a : b | |
using namespace std; | |
template<typename lt = long, typename sz = size_t> | |
struct MCMF { | |
static constexpr lt INF = 1e9; | |
static constexpr lt MAX_NODES = 1e6 + 5; |
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 <limits> | |
#define min(a, b) a < b ? a : b | |
using namespace std; | |
// note - only works with positive flows | |
// for negative flows just add to make positive | |
template<typename lt = long, typename sz = size_t> | |
struct Dinic { |
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
version: "3.4" | |
services: | |
pgAdmin: | |
restart: always | |
image: dpage/pgadmin4 | |
container_name: "pgadmin" | |
ports: | |
- "8000:80" |
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
#ifndef JSONLIB_H | |
#define JSONLIB_H | |
#include <iostream> | |
#include <cctype> | |
#include <unordered_map> | |
#include <sstream> | |
#include <memory> | |
#include <type_traits> | |
#include <iterator> |
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
import requests | |
from bs4 import BeautifulSoup | |
import sys | |
import os | |
template = """#include <bits/stdc++.h> | |
using namespace std; | |
class Solution { |
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
<!DOCTYPE html> | |
<!-- Similar to: https://storage.googleapis.com/spec-host-backup/mio-design%2Fassets%2F1eZNTdj8h1J0BFkbl23LyzEwjjvMzY_uV%2Fcards-elements-2b.png --> | |
<html> | |
<style> | |
body { | |
font-family: 'Roboto', sans-serif; | |
} | |
.row-container { | |
display: flex; | |
flex-direction: row; |
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 <iostream> | |
#include <vector> | |
#include <array> | |
using namespace std; | |
template<typename T> | |
using board = vector<vector<T> >; | |
typedef array<char, 3> encoding; |
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
#ifndef TRIE_H | |
#define TRIE_H | |
#include <unordered_map> | |
#include <exception> | |
#include <memory> | |
#include <string> | |
#include <list> | |
#include <stack> |
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
#ifndef PPA_H | |
#define PPA_H | |
#include "ppa_impl.h" | |
namespace ppa { | |
template< | |
typename RandomIt, | |
typename value_type = typename std::iterator_traits<RandomIt>::value_type |
NewerOlder