Try Again
摘要: 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). 阅读全文
posted @ 2018-04-19 16:04 十年换你一句好久不见 阅读(449) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/problemset/problem/963/A 不考虑正负的话,每两项之间之间公比为b/a,考虑正负,则把k段作为循环节,循环节育循环节之间公比为(b/a)^k,在把第一个k小节整体看作第一项,等比数列求和。 #include <iostream> #i 阅读全文
posted @ 2018-04-19 15:02 十年换你一句好久不见 阅读(441) 评论(0) 推荐(0) 编辑