Problem Set and Data Set: Acm-icpc-latin-america-2011

- C - Candy's Candy (Math)

- E - Electrical Pollution (Graph Traversal)

- F - File Retrieval (Stack, Suffix Array)

- G - Garden Fence (Sweep Line)

- H - Hedge Mazes (Graph Bridges, Strongly Connected Components)

C - Candy's Candy (math)

E - Electrical Pollution (graph traversal)

F - File Retrieval (stack, suffix array)

G - Garden Fence (sweep line)

H - Hedge Mazes (bridges)

Still clueless on D...

Oh thanks, i'm resolving the problem H.

It's easy to see that if you have a sequence of LCPs such as 1, 2, 3, 4, 2, 4, 1, in which 2 is less than or equal to all of the others, except the first and the last, then the words that contain the suffixes related to the 2,3,4,2,4 LCPs will form a searchable subset (there is a substring that appears in only those words). The stack is used to keep track of when those subsets are formed.

Here's my solution to problem C — Candy's Candy.

Here's my solution to problem D — Diccionário Portuñol.

Here's my solution to problem G — Garden Fence.

hey, I know it's been a "little" while since you've posted this, but can you explain the idea behind your solutions? I'm studying this questions and the only solution I could find was yours