原创 Landscaping 最大流 / 最小割

Preparations for a good harvest in Spring start now and farmer John is preparing his field for a good season. He went o

原创 Evacuation 二分圖匹配 + 最短路

Fires can be disastrous, especially when a fire breaks out in a room that is completely filled with people. Rooms usual

原创 Robin Hood 二分

We all know the impressive story of Robin Hood. Robin Hood uses his archery skills and his wits to steal the money fro

原创 2018-2019 ICPC 瀋陽站

https://codeforces.com/gym/101955 C題 題意:輸入n,k,q,問有多少1~n的排列,使得在把前k個按升序排好序後,最長上升子序列的長度不低於n-1. 暴力打表找規律,得出方程。 打表代碼: #incl

原创 Billboard 巧妙運用線段樹

在學校的入口處有一個巨大的矩形廣告牌,高爲h,寬爲w。所有種類的廣告都可以貼,比如ACM的廣告啊,還有餐廳新出了哪些好喫的,等等。。 在9月1號這天,廣告牌是空的,之後廣告會被一條一條的依次貼上去。 每張廣告都是高度爲1寬度爲wi的細長的

原创 D - Reversed LCS DP+DFS

https://agc021.contest.atcoder.jp/tasks/agc021_dDescripion: 給定一個字符串,可以更改其中的kk個字符,要求最大化該字符串與其翻轉字符串的LCSLCS長度,求該長度。Solutio

原创 Web Navigation(stl-棧)

Standard web browsers contain features to move backward and forward among the pages recently visited. One way to imple

原创 debug

RE:數組開小了/main函數裏數組開多了

原创 尺取+二進制 WiFi Password

Just days before the JCPC, your internet service went down. You decided to continue your training at the ACM club at yo

原创 如何輸入多組測試數據(Output Limit Exceeded錯誤)

當scanf讀取成功時返回讀取到的參數數量,否則返回EOF。EOF是一個宏,定義在stdio.h裏,值爲-1。以下面代碼爲例,正確的判斷方式有:sca

原创 如何判斷二分的邊界(完善中)

邊界一定不能寫成死循環。多畫幾次就能看出來的。

原创 Dual Core CPU POJ - 3469 最大流 最小割 Dinic算法

As more and more computers are equipped with dual core CPU, SetagLilb, the Chief Technology Officer of TinySoft Corpora

原创 食物,牛,和飲料 Dining 最大流 拆點 (Dinic)

Cows are such finicky eaters. Each cow has a preference for certain foods and drinks, and she will consume no others. F

原创 gym100851

https://codeforces.com/gym/100851/my        打表可以發現任何一個可能的答案,它的後綴也是正確答案。所以可以通過搜索求得解。初始的正解集合是{0,1},然後枚舉這些正解,在它的前面加上0,判斷是

原创 2017 CERC

https://codeforces.com/gym/101620/ 解題報告:https://www.cnblogs.com/GerynOhenz/p/8418171.html Problem J:Justified Jungle 題目