摘要:
置换循环的应用。起初的状态为1,2,3......n,变换一次变为题目给出的序列,找出每个循环,可知每次变换每个字符的位置都是由本循环中的位置循环移动而来,通过模运算可得出每个字符在变换了多次之后,应该在的位置。 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 using namespace std; 5 const int maxn=200+10; 6 char s[maxn],re[maxn]; 7 int num[maxn],vis[maxn],cir[maxn][max 阅读全文
posted @ 2013-05-07 21:12
LJ_COME!!!!!
阅读(129)
评论(0)
推荐(0)

浙公网安备 33010602011771号