1776:随机性验证

文件提交:无需freopen 内存限制:128 MB 时间限制:1.000 S
评测方式:普通裁判 命题人:
提交:2 解决:2

题目描述

给定一个字符串 lns="http://www.w3.org/1998/Math/MathML">,若 lns="http://www.w3.org/1998/Math/MathML"> 的任意一个长度大于或等于 lns="http://www.w3.org/1998/Math/MathML">2 的子串中,某一字符出现次数超过该子串长度的一半,则 lns="http://www.w3.org/1998/Math/MathML"> 是不够随机的。否则,我们称 lns="http://www.w3.org/1998/Math/MathML"> 是随机的。请判断 lns="http://www.w3.org/1998/Math/MathML"> 是否是一个随机的字符串。

输入

单独一个字符串,表示 lns="http://www.w3.org/1998/Math/MathML">


记 lns="http://www.w3.org/1998/Math/MathML"> 的长度为 lns="http://www.w3.org/1998/Math/MathML">

  • 对于 lns="http://www.w3.org/1998/Math/MathML">30% 的数据,lns="http://www.w3.org/1998/Math/MathML">11000
  • 对于 lns="http://www.w3.org/1998/Math/MathML">60% 的数据,lns="http://www.w3.org/1998/Math/MathML">110000
  • 对于 lns="http://www.w3.org/1998/Math/MathML">100% 的数据,lns="http://www.w3.org/1998/Math/MathML">1100000
    保证 lns="http://www.w3.org/1998/Math/MathML"> 仅由英文小写字母组成。


输出

  • 如果 lns="http://www.w3.org/1998/Math/MathML"> 满足随机的性质,输出 Random string
  • 否则,输出 Not a random string

样例输入-1 复制

happy

样例输出-1 复制

Not a random string

提示

对于子串app而言,p出现了两次,超过了长度的一半