Codeforces Round #697 Div3 Solution

This round of Div3 is interesting. Problem G is a basic DP + number theory + very strict time limit. The problem F is a complex implementation problem. The problem D sounds like DP. But actually just a greedy and binary search problem. Interesting.…