1 /** 2 题意: 给定一序列,置换k次之后 输出其状态 3 置换: 考察循环节长度, 4 思路: 分别求出每个元素的循环节的大小,用k 模其大小,大的k次之后的位置, 输出即可 5 **/ 6 7 #include8 #include 9 #include 10 using namespace std;11 12 int main()13 {14 int n;15 int sec[250];16 int path[250][250];17 int len[250];18 while(cin>>n&&n){19 memset(path,0,sizeof(path));20 memset(len,0,sizeof(len));21 int t;22 for(int i=0;i >t;24 sec[i] = t-1;25 }26 for(int i=0;i >k&&k){36 getchar();37 gets(str);38 char res[250];39 //int len = strlen(str);40 int m=0;41 for(;str[m];m++);42 for(int j=m;j