原创 Codeforces Round #262 (Div. 2) A

題目: A. Vasya and Socks time limit per test 1 second memory limit per test 256 megabytes input standard inp

原创 Codeforces Round #261 (Div. 2) A. Pashmak and Garden (水題)

題目: A. Pashmak and Garden time limit per test 1 second memory limit per test 256 megabytes input standard inp

原创 Codeforces Round #266 (Div. 2) A

題目: A. Cheap Travel time limit per test 1 second memory limit per test 256 megabytes input standard input ou

原创 Codeforces Round #262 (Div. 2) B

題目: B. Little Dima and Equation time limit per test 1 second memory limit per test 256 megabytes input standard

原创 HDOJ 1421 搬寢室 (DP)

題目: 搬寢室 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1731

原创 快速冪小模板

long long quickpow(long long m,long long n) { long long ans=1; while(n) { if(n&1) ans=(

原创 Codeforces Round #111 (Div. 2) B Unlucky Ticket (貪心)

題目: B. Unlucky Ticket time limit per test 2 seconds memory limit per test 256 megabytes input standard input

原创 Codeforces Round #263 (Div. 2) proA

題目: A. Appleman and Easy Task time limit per test 1 second memory limit per test 256 megabytes input standard i

原创 Codeforces Round #264 (Div. 2) C

題目: C. Gargari and Bishops time limit per test 3 seconds memory limit per test 256 megabytes input standard inp

原创 Codeforces Round #262 (Div. 2) C

題目: C. Present time limit per test 2 seconds memory limit per test 256 megabytes input standard input output

原创 Trie樹(字典樹) 個人模版

Trie樹的基本實現 字母樹的插入(Insert)、刪除( Delete)和查找(Find)都非常簡單,用一個一重循環即可,即第i 次循環找到前i 個字母所對應的子樹,然後進行相應的操作。實現這棵字母樹,我們用最常見的數組保存(靜態開

原创 Codeforces Round #261 (Div. 2) B. Pashmak and Flowers (水題)

題目: B. Pashmak and Flowers time limit per test 1 second memory limit per test 256 megabytes input standard inpu

原创 HDOJ 2087 剪花布條 (字符串)

題目: 剪花布條 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 853

原创 Codeforces Round #263 (Div. 2) proC

題目: C. Appleman and Toastman time limit per test 2 seconds memory limit per test 256 megabytes input standard i

原创 Codeforces Round #264 (Div. 2) A

題目: Caisa is going to have a party and he needs to buy the ingredients for a big chocolate cake. For that he is goin