Title sequence: AFGHIKL
A. Magic Mirror
The meaning of problems: determining whether a given string is equal to "jessie", is necessary to determine sensitive
Solution: 1. Use stl library tolower ... 2. ascii code with uppercase to lowercase, for example: 'A' + 32 = ' a '
*F. Modular Production Line
Solution: network flow longest section K coverage issues, Luo Valley P3358
reference solution to a problem reference code
G. Give Candies
Meaning of the questions: n two kids, n sugar, each child in order to get a random number of sugar until the sugar get finished, asked how many kinds of programs
Solution: separator method, the separator can be 0 (n saccharide only given to a child) or 1 (n saccharide only give two children), or two or ..... n-1 th separator of (n to n children sugar)
Cumulative sum
Is seeking 2 ^ (n-1)
but n is large, so use a small Fermat Euler descending or descending
Solution 1.
n-= (. 1-n-+ Phi (MOD))% Phi (MOD)
2. Method
Fermat's little theorem: A ^ = A ^ n-% MOD (n-% (. 1-MOD)) MOD%
n-= (n--. 1)% (MOD -. 1);
H. String and Times
Interpretations: SAM template questions, the number of statistics substring occurring in the string, the output> a and <b number of substrings in how to use the board
I. Save the Room
Solution: Law, there is an even edge 3 is met
* K. Transport Ship
Solution: multiple backpack + binary split
L. Poor God Water
Solution 1: dfs search 10 before obtained, BM algorithm for linear recurrence, BM Black & nice with a
solution of 2: Matrix Quick Reference 1 power matrix quick reference power of 2
First basis meaning of the questions, identify illegal state (poisoning ), two push two numbers next state number, constructed in accordance with the conditions of the matrix, the board set, ans ^ n-2.