摘要:
倘若存在 1,那么答案是 $n cnt_1$。 否则,设最短的公约数为 1 的区间长度为 $minlen$,答案是 $minlen 1+n 1$。 cpp include include using namespace std; int n, ans, gcd[2005][2005], cnt; i 阅读全文
posted @ 2018-01-21 22:05
poorpool
阅读(170)
评论(0)
推荐(0)
摘要:
明确几点 1. 假设有串 ab,那么 a 后头必须是 b,b 前头必须是 a,否则就不是最频繁的了。 2. 不可成环,aba是非法的。 cpp include include include include using namespace std; int n, len, ru[35], chu[3 阅读全文
posted @ 2018-01-21 20:33
poorpool
阅读(227)
评论(0)
推荐(0)

浙公网安备 33010602011771号