原创 K - Anniversary party【樹形dp】

There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a

原创 AtCoder beginner contest 053 solution

A.ABC/ARC #include <algorithm> #include <iostream> #include <cstring> #include <cstdio> #include <string> #include

原创 Codeforces Round #551 (Div. 2)【補題】

又是慢慢比賽的一天,快到十點的時候已經滿是疲憊了,於是我當即關上電腦,從機房回到宿舍,所以又要來補題了(哭),何時才能上分上去啊。 A. Serval and Bus 題意:小男孩一個點鐘到車站,每輛車都有來的時間和間隙,問小男孩能坐

原创 POJ1094

/**/ #include <algorithm> #include <iostream> #include <cstring> #include <cstdio> #include <string> #include <vector

原创 Codeforces Round #552 (Div. 3) 補題

A. Restoring Three Numbers 解方程題,很水。 /**/ #include <algorithm> #include <iostream> #include <cstring> #include <cstdio

原创 UPC第六場【補題】

A.Birthday Cake 待填坑 B 思路簡單,先跑一遍最短路,然後加邊意味着這兩個點的邊耗費爲0,在跑一次最短路,然後刪邊,再用下一個跑最短路。最小的即爲最優解。 #include <algorithm> #include

原创 AtCoder Beginner Contest 056

A.HonestOrDishonest #include <algorithm> #include <iostream> #include <cstring> #include <cstdio> #include <string> #

原创 Atcoder beginner contest 055 solution

A.Restaurant 水題不解釋 #include <algorithm> #include <iostream> #include <cstring> #include <cstdio> #include <string> #i

原创 AtCoder beginnner contest 053 solution

A.ABC/ARC #include <algorithm> #include <iostream> #include <cstring> #include <cstdio> #include <string> #include <v

原创 Codeforces Round #550 (Div. 3)【補】

我實在是太雞了,天天gugugu不說,題也不會寫,只能開始漫長的補題生活了。 A. Diverse Strings #include <algorithm> #include <iostream> #include <cstring>

原创 Atcoder beginner contest 052 solution

A.Two Rectangles 題意:求大矩形面基,zz題 思路:不解釋 #include <algorithm> #include <iostream> #include <cstring> #include <cstdio> #

原创 Atcoder beginner constest 050 solution

A.Addition and Subtraction Easy 題目大意:連續輸入整數,字符,整數這種順,要求你按題意求值; #include <algorithm> #include <iostream> #include <cst

原创 離散化

本篇將介紹離散化的入門 離散化是什麼:一些數字,他們的範圍很大(0-1e9),但是個數不算多(1-1e5),並且這些數本身的數字大小不重要,重要的是這些數字之間的相對大小(比如說某個數字是這些數字中的第幾小,而與這個數字本身大小沒有關

原创 Codeforces Global Round 2

好久沒有寫博客了,回來熱熱手順便找找感覺(gugugu) 這次以爲下午剛打完訓練賽又恰巧打的成績不好,所以基本上沒出幾題(又掉了一波分),只能現在補補題了。 A. Ilya and a Colorful Walk 題目大概就是說從最大

原创 Tak and Hotels II【倍增】

Tak and Hotels II 時間限制: 1 Sec 內存限制: 128 MB 提交: 140 解決: 38 [提交] [狀態] [命題人:admin] 題目描述 N hotels are located on a stra