原创 kuangbin三Dancing Links合集

Dancing Links,跳舞鏈,是一種數據結構以及配套的算法,用於解決精確覆蓋問題與重複覆蓋問題。具體講解博客鏈接: https://www.cnblogs.com/grenet/p/3145800.html https:

原创 FHQ_Treap樹(無旋Treap樹)模板向

這種樹是一種無需旋轉操作的Treap樹,由FHQ(範浩強)大佬發明,堪稱是神級的數據結構!他短小精悍,易於學習,而其思想之優雅令無數OIer/ACMer以及程序員們爲之着迷! 而這一切都來源於這一份ppt:範浩強談數據結構 在瞭解

原创 codeforces 1029E(貪心)

Description You are given an undirected tree consisting of n n vertices. An undirected tree is a connected undirected g

原创 廣義高階冪取模(模板向)

高階冪,或者叫冪塔,指的是一個數冪次的冪次的冪次……,也就是aaa...a^{a^{a...}}aaa... 而廣義高階冪則指冪塔上存在不同的數,形如a0a1a2...a_0^{a_1^{a_2...}}a0a1a2​...​​

原创 2019杭電多校 Nonsense Time(hdu 6635)DP+暴力

題目鏈接:http://acm.hdu.edu.cn/showproblem.php?pid=6635 題目大意:給定一個序列,再給一個序號的序列,最開始序列都是凍住的,依次按照序號序列的順序解凍,每解凍一個,就要求所有解凍了的元

原创 2019牛客多校第二場 H-Second Large Rectangle

題目鏈接:https://ac.nowcoder.com/acm/contest/882/H 題目大意: 給定一個N行M列的01矩陣,求面積次大的全由1組成的子矩陣面積 當矩陣中只存在數量小於兩個這樣的子矩陣時輸出0 解題思路:

原创 POJ 3685 Matrix(二分套二分)

題目描述 Given a N × N matrix A, whose element in the i-th row and j-th column Aij is an number that equals i2 + 100000

原创 2019牛客多校第四場 K-number

題目鏈接:https://ac.nowcoder.com/acm/contest/884/K 題目描述: 300iq loves numbers who are multiple of 300. One day he got a

原创 poj 2559 Largest Rectangle in a Histogram(單調棧)

題目描述 A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles ha

原创 2019牛客多校第一場 J-Fraction Comparision

題目鏈接:https://ac.nowcoder.com/acm/contest/881/J 分析: 比較x/a與y/b的大小,x, y的範圍是1e18,a, b的範圍是1e9,用一般的通分變成xb與ya這種交叉相乘的形式進行比較

原创 ffbzKAYWrn

牛客CSDN兩開花~

原创 2019牛客多校第三場 D-Big Integer(數論)

題目鏈接:https://ac.nowcoder.com/acm/contest/883/D 題目描述: For little pupils, a very large number usually means an intege

原创 2019牛客多校第一場 F-Random Point in Triangle

題目鏈接:https://ac.nowcoder.com/acm/contest/881/F 題目描述 Bobo has a triangle ABC with A(x1,y1), B(x2,y2) and C(x3,y3). P

原创 ZOJ 3177 Elune's Arrow(解析幾何)

Description Priestess of the Moon (PotM) is a very interesting hero in the game Defense of the Ancients (DotA). Here

原创 UVA 11752 Super Power(數論 技巧枚舉)

Descripe: We all know the Super Powers of this world and how they manage to get advantages in political warfare or ev