博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
poj 1206
阅读量:4543 次
发布时间:2019-06-08

本文共 842 字,大约阅读时间需要 2 分钟。

1 /** 2 题意: 给定一序列,置换k次之后  输出其状态 3 置换: 考察循环节长度, 4 思路: 分别求出每个元素的循环节的大小,用k 模其大小,大的k次之后的位置, 输出即可 5 **/ 6  7 #include 
8 #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

 

转载于:https://www.cnblogs.com/Bang-cansee/p/3724284.html

你可能感兴趣的文章
正则表达式
查看>>
c# 执行 sql service 的存储过程
查看>>
《软件构架实践》读后感03
查看>>
jQuery入门(4)jQuery中的Ajax应用
查看>>
Java 发送http GET/POST请求
查看>>
索引之详解一
查看>>
Android Jetpack组件
查看>>
使用.NET Core 2.1的Azure WebJobs
查看>>
JS生成GUID
查看>>
异步测试
查看>>
Educational Codeforces Round 53 (Rated for Div. 2) C. Vasya and Robot 【二分 + 尺取】
查看>>
Bootstrap进度条
查看>>
[BZOJ1096][ZJOI2007]仓库建设(斜率优化DP)
查看>>
Vue 2.0 生命周期-钩子函数理解
查看>>
Spoj NSUBSTR - Substrings
查看>>
CodeForces - 1009E Intercity Travelling
查看>>
【JMeter】JMeter在linux下运行
查看>>
Mac显示器不亮
查看>>
luogu P2312 解方程
查看>>
Cordova开发速记
查看>>