摘要: 蜜汁打表题、、 (首先L=1和L=N的情况过于傻逼(而且是特殊情况),可以先写出来,然后剩下的L的做法在下面) 首先你要写一个打表程序,找出{1,2,....,n} 乘若干个 循环唯一的轮换可以搞出的所有排列,然后统计一下对于每个i,总环数=i 的排列的个数 cnt[i]。 如果你规律找的好的话,是 阅读全文
posted @ 2018-06-11 20:59 蒟蒻JHY 阅读(311) 评论(0) 推荐(0) 编辑
摘要: Problem Statement One day, Takahashi was given the following problem from Aoki: You are given a tree with N vertices and an integer K. The vertices ar 阅读全文
posted @ 2018-06-11 20:47 蒟蒻JHY 阅读(323) 评论(0) 推荐(0) 编辑
摘要: Problem Statement You are participating in a quiz with N+M questions and Yes/No answers. It's known in advance that there are N questions with answer 阅读全文
posted @ 2018-06-11 19:43 蒟蒻JHY 阅读(358) 评论(0) 推荐(0) 编辑
摘要: Discription Arkady's code contains nn variables. Each variable has a unique name consisting of lowercase English letters only. One day Arkady decided 阅读全文
posted @ 2018-06-11 16:47 蒟蒻JHY 阅读(391) 评论(0) 推荐(0) 编辑
摘要: 简单最短路计数。 阅读全文
posted @ 2018-06-11 15:36 蒟蒻JHY 阅读(267) 评论(0) 推荐(0) 编辑