原创 暑期集訓 Contest 2

Glory And String   時間限制: 1 Sec  內存限制: 128 MB   題目描述 輸入 First line is the number of strings T, the T lines follow, each

原创 HDU 3746 Cyclic Nacklace(Next 數組性質)

Problem Description CC always becomes very depressed at the end of this month, he has checked his credit card yesterd

原创 POJ 1182 食物鏈(並查集 帶權路徑)

Description 動物王國中有三類動物A,B,C,這三類動物的食物鏈構成了有趣的環形。A吃B, B吃C,C吃A。 現有N個動物,以1-N編號。每個動物都是A,B,C中的一種,但是我們並不知道它到底是哪一種。 有人用兩種說法對這N個

原创 暑期集訓 Contest 1

Glory and LCS 時間限制: 1 Sec  內存限制:128 MB 提交: 217  解決: 48 題目描述 大家都知道,Glory不但知識水平高,並且非常喜歡思考,有一天Glory在思考一個問題,他在紙上寫了兩個1到n的排列,

原创 [Offer收割]編程練習賽24

HihoCoder 1562 ⼩Hi的鐘表 時間限制:10000ms 單點時限:1000ms 內存限制:256MB 描述 ⼩Hi喜歡各種⾓度。⼀天,他注意到了鐘錶上的⾓度,於是他想考考他的好朋友⼩Ho:對於⼀個24⼩時制的時刻,

原创 Codeforces Round #575 (Div. 3) D1&D2(DP)

RGB Substring time limit per test: 2 seconds    memory limit per test: 256 megabytes input: standard input   output: st

原创 Codeforces Round #574 (Div. 2) D1&D2(數論 + 組合數學)

time limit per test: 2 seconds memory limit per test: 256 megabytes input: standard input output: standard output This

原创 Codeforces Round #570 (Div. 3) D (貪心)

Candy Box (easy version) time limit per test: 3 seconds memory limit per test: 256 megabytes input: standard input outp