原创 [bzoj5017][線段樹優化建邊]炸彈

5017: [Snoi2017]炸彈 Time Limit: 30 Sec Memory Limit: 512 MB Submit: 243 Solved: 95 [Submit][Status][Discuss] De

原创 [dp][Lydsy1704月賽]序列操作

4831: [Lydsy1704月賽]序列操作 Time Limit: 1 Sec Memory Limit: 128 MB Submit: 207 Solved: 70 [Submit][Status][Discuss]

原创 [積性函數]DIVCNT2 - Counting Divisors (square)

http://www.spoj.com/problems/DIVCNT2/ sol: 考慮到i^2這個東西有點噁心 w(x)表示x的不同的質因子個數 ∑d|i21=∑d|i2w(d)∑d|i21=∑d|i2w(d) 實際上就

原创 作業題 Saving Tang Monk

A:Saving Tang Monk 《Journey to the West》(also 《Monkey》) is one of the Four Great Classical Novels of Chinese litera

原创 [bzoj3083][樹鏈剖分]遙遠的國度

3083: 遙遠的國度 Time Limit: 10 Sec Memory Limit: 512 MB Submit: 4426 Solved: 1190 [Submit][Status][Discuss] Descri

原创 [bzoj4289]PA2012 Tax

4289: PA2012 Tax Time Limit: 10 Sec Memory Limit: 128 MB Submit: 996 Solved: 299 [Submit][Status][Discuss] Des

原创 [bzoj4923][splay]K小值查詢

4923: [Lydsy1706月賽]K小值查詢 Time Limit: 15 Sec Memory Limit: 256 MB Submit: 415 Solved: 121 [Submit][Status][Discu

原创 [bzoj4025][動態樹]二分圖

4025: 二分圖 Time Limit: 20 Sec Memory Limit: 512 MB Submit: 2174 Solved: 792 [Submit][Status][Discuss] Descripti

原创 [bzoj4919][splay]大根堆

4919: [Lydsy1706月賽]大根堆 Time Limit: 10 Sec Memory Limit: 256 MB Submit: 500 Solved: 225 [Submit][Status][Discuss

原创 [bzoj4199][後綴數組][後綴自動機]品酒大會

4199: [Noi2015]品酒大會 Time Limit: 10 Sec Memory Limit: 512 MB Submit: 1391 Solved: 793 [Submit][Status][Discuss]

原创 [51nod][積性函數]莫比烏斯函數之和

http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1244 sol: 簡單杜教篩 #include<iostream> #include<string> #

原创 [bzoj3786][splay]星系探索

3786: 星系探索 Time Limit: 40 Sec Memory Limit: 256 MB Submit: 1524 Solved: 484 [Submit][Status][Discuss] Descript

原创 [3月集訓]D1T3

sol: 點贊 收藏 分享 文章舉報 Gzb1128 發佈了169 篇原創文章 · 獲贊 7 · 訪問量 2萬+ 私信

原创 [2-sat]小結

因爲一直不怎麼會這個東西,所以今天整理一下這個東西的內容。 原來這個東西這麼簡單的嗎。2sat裏面一條邊x->y表示x選了之後y必須選,只要建出滿足這種條件的邊之後跑tarjan就可以知道到底有沒有解了。因此x &^| y這種布爾

原创 [3月集訓]D1T2

sol: 考慮到漢諾塔 遊戲。中間顯然會有一個狀態,使得最大的盤子在a柱,目標是c,其他盤子都在b。那我們考慮把這個狀態稱爲中間狀態。那麼現在考慮怎麼把起始的盤子弄到這個中間狀態,再把終止的盤子弄到這個中間狀態。顯然對於每一