摘要: 和UVa11077的分析很类似。我们固定左脚的鞋子不动,然后将右脚的鞋子看做一个置换分解。对于一个长度为l的循环节,要交换到正确位置至少要交换l-1次。 1 #include 2 #include 3 #include 4 using namespace std; 5 6 bool vis[... 阅读全文
posted @ 2015-03-27 23:09 AOQNRMGYXLMV 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 我看大多数人的博客只说了一句:找规律得答案为(n + m) / gcd(n, m)不过神题的题解还须神人写。。We can associate at each cell a base 3-number, the log3(R) most significant digits is the index... 阅读全文
posted @ 2015-03-27 18:09 AOQNRMGYXLMV 阅读(416) 评论(0) 推荐(0) 编辑