摘要:
You are given a tree (a graph with n vertices and n - 1 edges in which it's possible to reach any vertex from any other vertex using only its edges). 阅读全文
摘要:
http://codeforces.com/problemset/problem/963/A 不考虑正负的话,每两项之间之间公比为b/a,考虑正负,则把k段作为循环节,循环节育循环节之间公比为(b/a)^k,在把第一个k小节整体看作第一项,等比数列求和。 #include <iostream> #i 阅读全文