#F AC 11 mins
Brute force
#A AC 23 mins
SG function
#I AC 86 mins 4 wrong tries
Brute force
#G AC 171 mins 3 wrong tries
Math
#J AC 208 mins
DP
#D AC 210 mins
AC by whd
#C AC 287 mins
System of difference constraints
Shortest path
After contest:
#H AC
Math,brute force,dfs
#B AC
Math