原创 Codeforces 1A. Theatre Square
A. Theatre Square time limit per test 2 seconds memory limit per test 64 megabytes input standard input outpu
原创 UVa10361-Automatic Poetry-字符串-難度1
題目鏈接: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1302 Problem I Au
原创 LeetCode Reverse Integer
Reverse Integer Reverse digits of an integer. Example1: x = 123, return 3
原创 拓撲排序+有向無環圖(DAG)的檢測
參考: 算法導論第三版 p356, 數據結構與算法分析p218, 算法入門經典p110 拓撲排序的兩張方法: 1.dfs搜索 2.模擬人工的拓撲 兩
原创 LeetCode Palindrome Number
Palindrome Number Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers.
原创 Codeforces 6C. Alice, Bob and Chocolate
C. Alice, Bob and Chocolate time limit per test 2 seconds memory limit per test 64 megabytes input standar
原创 Codeforces 5D. Follow Traffic Rules
D. Follow Traffic Rules time limit per test 1 second memory limit per test 64 megabytes input standard inp
原创 Codeforces 5E. Bindian Signalizing
E. Bindian Signalizing time limit per test 4 seconds memory limit per test 256 megabytes input standard in
原创 C++ 可調用對象的總結
C++總共有5種可調用對象: 普通函數, 函數指針, lambda, 函數對象(仿函數), bind創建的對象(主要將多元謂詞降次) 具體代碼如下: #include <vector> #include <algorithm> #inc
原创 Codeforces 5C. Longest Regular Bracket Sequence
C. Longest Regular Bracket Sequence time limit per test 2 seconds memory limit per test 256 megabytes inpu
原创 Codeforces 4D. Mysterious Present
D. Mysterious Present time limit per test 2 seconds memory limit per test 64 megabytes input standard inpu
原创 Codeforces 5A. Chat Server's Outgoing Traffic
A. Chat Server's Outgoing Traffic time limit per test 1 second memory limit per test 64 megabytes input st
原创 Codeforces 5B. Center Alignment
B. Center Alignment time limit per test 1 second memory limit per test 64 megabytes input standard input
原创 Codeforces 6A. Triangle
A. Triangle time limit per test 2 seconds memory limit per test 64 megabytes input standard input output
原创 Codeforces 4C. Registration system
C. Registration system time limit per test 5 seconds memory limit per test 64 megabytes input standard inp