来看这个notion好了
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
default (Int, Integer, Rational, Double) | |
if' :: Bool -> a -> a -> a | |
if' True x _ = x | |
if' False _ y = y | |
isBraidIdentity x n = | |
[1..n] == concat (map (braidReduce x) [[y] | y <- [1..n]]) | |
braidReduce = flip (foldr homomorphism) |
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 numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
from matplotlib.ticker import FuncFormatter | |
import math | |
N = 400 # number of tickets | |
i = 100000 # number of trials | |
k = 52 # number of weeks | |
rate = 0.002 # standard apr |
这么多GC里面最强力的GC应该是Visa GC了(同理还有Mastercard和amex的, 但是比较少见, 用起来差不多). Visa GC (VGC)会有不同的银行发行.
让p%为你的最强任意地方返现卡. 相信大多人这张卡是下面3个
- 各种类似的2%返现卡.
- Chase freedom unlimited, 1.5 UR, 价值2.25%.
- Citi double cash, 可以转换成 2 TYP, 价值2.5%.
- Amex blue business plus 2 MR 价值2.5% (上限是一年50k spend, 普通人应该用不完).
- BoA premium + platinum honors 是2.625%.
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
% ========================-*- LaTeX -*-========================= | |
% | |
% chao.sty -- modified from jeffe.sty | |
% jeffe.sty can be found at http://web.engr.illinois.edu/~jeffe/pubs/latex.html | |
% | |
% ========================================================== | |
\RequirePackage{latexsym,amsmath} | |
\RequirePackage[dvipsnames,usenames]{xcolor} | |
%\PassOptionsToPackage{hyphens}{url} |
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 java.util.*; | |
class PLC{ | |
public TreeMap<Integer, Integer> segmentlist = new TreeMap<Integer, Integer>(); | |
public int upperBound = 0; | |
public int lastSlope = 0; | |
public int startValue = 0; | |
public int shift = 0; | |
private static int INF = 100000000; | |
private int lb() { |
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
\begin{itemize} | |
\item Tree reconstruction from inorder and postorder. | |
\item find path sum in the tree \url{https://leetcode.com/problems/path-sum-ii/} | |
\item longest substring without repeated character. \url{https://leetcode.com/problems/longest-substring-without-repeating-characters/} | |
\item Longest Palindromic Substring \url{https://leetcode.com/problems/longest-palindromic-substring/} | |
\item Container With Most Water \url{https://leetcode.com/problems/container-with-most-water/solution/} | |
\item 3sum, 4sum, ksum | |
\item next permutation \url{https://leetcode.com/problems/next-permutation/} | |
\item Permutation generation \url{https://leetcode.com/problems/permutations-ii/} | |
\item Group Anagrams \url{https://leetcode.com/problems/group-anagrams/} |
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
\begin{itemize} | |
\item Tree reconstruction from inorder and postorder. | |
\item find path sum in the tree \url{https://leetcode.com/problems/path-sum-ii/} | |
\item longest substring without repeated character. \url{https://leetcode.com/problems/longest-substring-without-repeating-characters/} | |
\item Longest Palindromic Substring \url{https://leetcode.com/problems/longest-palindromic-substring/} | |
\item Container With Most Water \url{https://leetcode.com/problems/container-with-most-water/solution/} | |
\item 3sum, 4sum, ksum | |
\item next permutation \url{https://leetcode.com/problems/next-permutation/} | |
\item Permutation generation \url{https://leetcode.com/problems/permutations-ii/} | |
\item Group Anagrams \url{https://leetcode.com/problems/group-anagrams/} |
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 Data.List | |
import Control.Applicative | |
import Control.Arrow | |
import Control.Monad | |
import RankSelection | |
-- this provides selectRank, which outputs the kth largest element of a list | |
-- selectRank :: Ord a => [a] -> Int -> a | |
type Matrix a = (Int->Int->a, Int, Int) |
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
# Logic: | |
# a > b --> discard everything to the left of a | |
# a < b --> discard everything to the right of b | |
# a = b = c --> we know that either | |
# a) all elements between a and b are all equal to b, or | |
# b) all elements between b and c are all equal to b. | |
# time for a linear search. | |
def minvalley(xs, l, r): | |
while True: |