当前位置:网站首页>loop word
loop word
2022-08-11 00:58:00 【51CTO】
If a word is obtained by a circular right shift, we call these words a type of circular word.For example: picture and turepic belong to the same kind of cyclic word.Now given n words, we need to count how many kinds of cyclic words there are in the n words.
Input description:
Input consists of n+1 lines:
The number of words in the first line is n (1 ≤ n ≤ 50)
The next n lines, each line has a word word[i], length length (1 ≤ length ≤ 50).Consists of lowercase letters
Output description:
Output the number of loop words
Example 1
Input
5
picture
turepic
icturep
word
ordw
output
2
example 2
input
4
goran
igor
domagoj
relja
output
4
explain
It doesn't have to contain two or more different words to be a cycle word!
边栏推荐
- 总结Qt中常用文件信息QFileInfo的获取:后缀,名称,路径,链接
- Only lazy and hungry. You still don't understand the singleton pattern!
- 【考虫 六级英语】语法课笔记
- [GXYCTF2019]BabySQli
- SAP ABAP JSON 格式数据处理
- "NIO Cup" 2022 Nioke Summer Multi-School Training Camp 4 ADHK Problem Solving
- Apache Commons Configuration Remote Code Execution Vulnerability (CVE-2022-33980) Analysis & Reproduction
- 【mysql】mysql分别按年/月/日/周分组统计数据
- 3d打印出现stl文件物体不是流形,意味着不是水密体...解决办法
- 16. 最接近的三数之和
猜你喜欢
SQL statement--get database table information, table name, column name, description comment, etc.
时间戳转换为日期格式、获取当前时间戳
MSTP——多生成树(案列+配置)
PMP每日一练 | 考试不迷路-8.10(包含敏捷+多选)
单片机人机交互--矩阵按键
构建检测,无规矩不成方圆
Distributed. Performance optimization
R语言多元线性回归、ARIMA分析美国不同候选人对经济GDP时间序列影响
apache+PHP+MySQL+word press,安装word press时页面报错?
数据分析面试手册《统计篇》
随机推荐
【爬虫】scrapy创建运行爬虫、解析页面(嵌套url)、自定义中间件(设置UserAgent和代理IP)、自定义管道(保存到mysql)
dump_stack ()
Elastic scaling of construction resources
构建资源的弹性伸缩
【pypdf2】合并PDF、旋转、缩放、裁剪、加密解密、添加水印
Apache Commons Configuration Remote Code Execution Vulnerability (CVE-2022-33980) Analysis & Reproduction
【.NET Core】使用 NPOI 读写Excel 文件
MySQL advanced query
Difference Between Image Recognition and Semantic Segmentation
The SAP ABAP JSON format data processing
what is an array
vim取上个窗口号.
C# using timer
R语言多元线性回归、ARIMA分析美国不同候选人对经济GDP时间序列影响
两个数组的交集
nodejs项目连接mysql数据库
Web APIs BOM - A Comprehensive Case of Operating Browsers
EN 12467纤维水泥平板产品—CE认证
J9数字论:DAO治理更像一种生态过程:治理原生于网络,不断演变
【C语言】探索数据的存储(整形篇)