A brief note for Codeforces Round568 Div2.
Suffix Automaton Study Note This is a review & note for studying suffix automaton. What is a Suffix Automaton? In computer science, a suffix automaton is the smallest partial deterministic finite automaton that recognizes the set of suffixes of a given string(computer_science). The above definition is a short excerpt from Wikipedia about suffix automaton. From the definiton of deterministic finite automaton, we let […]
Chapter 3: Pigeonhole Principle This is a reading note of Introductory Combinatorics by Richard A. Brualdi. The following aspects are ones that are most important within this chapter: Simple Version of Pigeonhole Principle Application of Simple Pigeonhole Principle Enhanced Version of Pigeonhole Principle Applications of Enhanced Pigeonhole Principle Ramsey Theorem Simple Version of Pigeonhole Principle […]
[latexpage] Chapter 2: Permutation and Combination This is a reading note of Introductory Combinatorics by Richard A. Brualdi. There are several important aspects within this chapter that I will include in this. Four Basic Counting Principle Permutation & Combination within Single Set Permutation & Combination within Multiple Sets Finite Possibility Introduction to Set We define […]
Last Update: July, 2018 First time post a codeforces contest. Don’t know how to do the last one.. emm… Save this for later Since this is only a Div 2, so I won’t include much explanation(took me centuries to finish). Typesetting is to0 hard… A: Just do it #include <iostream> #include <cstring> #include <string> […]
Problem Description: There are N nodes and M directed roads with weight in an acyclic graph. At each node, there is a probability of 1 / K to go to each next node, where K number of roads that are connected to current node. Starting at 1, calculate the total expectancy distance to go to […]
Problem Description: Mowing the Lawn [Neal Wu, 2008] After winning the annual town competition for best lawn a year ago,Farmer John has grown lazy; he has not mowed the lawn since thenand thus his lawn has become unruly. However, the competition isonce again coming soon, and FJ would like to get his lawn intotiptop shape […]