Topic 1: PROB Drainage Ditches
It's a question that Luoluo seeks the greatest flow
The following is MAIGO's PREFLOW algorithm, almost memorized it, but I feel that I should learn DINIC algorithm!
Topic 2: The Perfect Stall
Algorithm: Luoluo's Hungary
Basically memorized it
Topic 3: Job Processing
Algorithm: Greedy
I don’t really understand yet, here is the MAIGO method
Topic 4: Cowcycles
** Description: Given the values that can be selected for the front and rear gears, select F and R from the front gear and the rear gear. What is the combination that
meets the conditions of 3x (maximum speed/minimum speed>=3) and the smallest variance according to the calculation rules?
** Algorithm: DFS
** Analysis: My search skills are really lacking. . .
1. Enumerate the situation of the front and rear gears respectively;
2. According to the formula x = (fmax/rmin)/(fmin/rmax) >= 3, know
3*rmin*fmin <= fmax*rmax
pruning 1: enumerate first When fmin, rmin, if this condition is not met, exit directly; (according to the incrementality)
pruning 2: judging by enumerating fmax, rmax;
pruning 3: enumerating boundary finish control
pruning 4: online For relatively few numbers, it is better to use insertion sort to be faster.