0w1

Entries from 2016-05-01 to 1 day

CFR 349 D. World Tour ( Graph )

Problem - D - Codeforces Edges are all weighted 1, so we can apply BFS for single source shortest path, for each node as source. This allows us to get all pairwise distances in O( n ^ 2 ). Since we are to find the maximum distance of path …

CFR 349 C. Reberland Linguistics ( DP )

http://codeforces.com/contest/667/problem/C Misunderstood the problem, thought some valid suffix must be some substring of the prefix and failed... Seems like everyone else had no problem understanding that it actually only wanted us to co…