原创 Codeforces 545D - Queue (水題)
D. Queue time limit per test 1 second memory limit per test 256 megabytes input standard input output standard
原创 KMP中的一些技巧(°ο°)~ @
1.最小循環節 : 以下是我看的描述最小循環節能讓我看懂的一篇博客~~~ 先簡單介紹一下KMP算法利用 nxt 數組求最小循環節的原理: 假設圖中的黑色是原來的字符串,現在要求最小循環節,對於nxt[len
原创 gym 101512 BAPC 2014 I Interesting Integers (拓展歐幾里得 + 斐波那契)
轉載至:http://blog.csdn.net/HackerTom/article/details/78061843 Problem codeforces.com/gym/101512/attachments vjudge.
原创 Codeforces 385D -Bear and Floodlight (狀壓DP+幾何)
D. Bear and Floodlight time limit per test 4 seconds memory limit per test 256 megabytes input standard input
原创 Codeforces 496D Tennis Game(二分)
D. Tennis Game time limit per test 2 seconds memory limit per test 256 megabytes input standard input
原创 乘法逆元的求解
轉載地址:http://www.cnblogs.com/dupengcheng/p/5487362.html 在開始之前我們先介紹3個定理: 1.乘法逆元(在維基百科中也叫倒數,當然是 mod p後的,其實就是倒數不是嗎?): 如
原创 codeforces 680C Bear and Prime 100(數論)
C. Bear and Prime 100 time limit per test 1 second memory limit per test 256 megabytes input standard i
原创 Atlantis HDU - 1542 線段樹+掃描線求面積並
一點心得: 這一題是我學掃描線的第一題,掃描線的原理是比較好理解的,主要是離散化座標後用線段樹維護x或是y軸上的線段,乘以掃描線所經過的距離就是面積了。 這裏有一個我看到的解釋掃描線的博客:掃描線的解釋 >”< 我
原创 Codeforces 535D - Tavas and Malekas (KMP)
D. Tavas and Malekas time limit per test 2 seconds memory limit per test 256 megabytes input standard input ou
原创 Codeforces Round #396 D (帶權並查集)
Mahmoud wants to write a new dictionary that contains n words and relations between them. There are two types of re
原创 Codeforces839D Winter is here (數論:容斥原理)
D. Winter is here time limit per test 3 seconds memory limit per test 256 megabytes input standard input outpu
原创 Codeforces Round #415 (Div. 2) C. Do you want a date?
A. Do you want a date? Leha decided to move to a quiet town Vičkopolis, because he was tired by living in Bankopoli
原创 codeforces 680D D. Bear and Tower of Cubes(dfs+貪心)
Bear and Tower of Cubes time limit per test 2 seconds memory limit per test 256 megabytes input standard inp
原创 Codeforces 385C Bear and Prime Numbers(數論)
C. Bear and Prime Numbers time limit per test 2 seconds memory limit per test 512 megabytes input standard input
原创 Removing Columns - CodeForces 496 C
C. Removing Columns time limit per test 2 seconds memory limit per test 256 megabytes input standard input