原创 2016 UESTC Training for Math Problem B-三角形棋盤上的博弈遊戲(打表+DP)
B - 三角形棋盤上的博弈遊戲 Time Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) 柱爺有天上課無聊,於是和同桌卿學姐一起
原创 Graham Scan凸包算法
原文鏈接:https://segmentfault.com/a/1190000000488339;作者: Michael_Lin 獲得凸包的算法可以算是計算幾何中最基礎的算法之一了。尋找凸包的算法有很多種,Graham Scan算法是一
原创 2016 UESTC Training for Math Problem D-熄燈啦!(亂搞)
D - 熄燈啦! Time Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) 冬天的時候,寢室阿姨會給全棟樓斷電,但衆所周知,卿學
原创 poj 1860 spfa算法判斷圖中是否有正環
Currency Exchange Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 25582 Accepted: 9369 Description Sev
原创 GSS3 - Can you answer these queries III
You are given a sequence A of N (N <= 50000) integers between -10000 and 10000. On this sequence you have to apply M (
原创 poj 2367 前向星+拓撲排序
Genealogical tree Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 4402 Accepted: 2922 Special Judge
原创 ACM ICPC Greater NewYork Region 2015 Problem E-A Rational Sequence
題意理解:就是讓你在滿二叉樹上尋找規律,根據給出的p,q推出對應的編號; 思路:顯然,p<q時是左兒子,p>q是右兒子,p=q是根節點;然後繼續觀察規律;我們可以輕易求出位於樹上最左邊和最右邊上的點的編號;分別爲2^(q-1),2^q-
原创 spoj ADAFIELD - Ada and Field(水題)
ADAFIELD - Ada and Field #binary-search #datastructures Ada the Ladybug owns a beautiful field where she grows vegeta
原创 spoj CPCRC1C(數位dp)
CPCRC1C - Sum of Digits #dynamic-programming Majid is a 3rd-grade elementary student and quite well in mathematics
原创 spoj 11404 Save Thy Toys
DCEPC501 - Save Thy Toys Leonard is very fond of buying rare and expensive science fiction toys. He keeps his collect
原创 hdu3887 Counting Offspring(dfs序+樹狀數組)
Counting Offspring Time Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submissio
原创 GSS4 - Can you answer these queries IV
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 10px; color: rgb(85, 85, 85); font-family: "Open Sans
原创 hdu 4405 Aeroplane chess(全期望公式)
Aeroplane chess Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s)
原创 spoj ADABEHIVE - Ada and Behives(二維樹狀數組)
ADABEHIVE - Ada and Behives #datastructures Ada the Ladybug is currently doing her thesis. It is almost complete with
原创 hdu 3487Play with Chain(Splay)
Play with Chain Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s)