双手抱在胸前代表什么| 痢疾是什么原因引起的| 小肚子疼是什么原因引起的| 最高法院院长什么级别| 谷旦是什么意思| 脑洞是什么意思| 怀孕能吃什么| 屁股长痘痘是什么原因| 眼睛流泪用什么眼药水| 胎心胎芽最晚什么时候出现| 珩字五行属什么| 牙齿黄用什么牙膏| 朝鲜说什么语言| 车水马龙什么意思| dv是什么牌子| 梦见别人受伤流血是什么预兆| 五福临门是什么生肖| 女生左手无名指戴戒指什么意思| 虾青素有什么作用| hbv是什么| 儒家是什么意思| 月经不来什么原因| 月经前长痘痘是什么原因| 睡多了头疼是什么原因| 为什么会长荨麻疹| bmo是什么意思| 孩子营养不良吃什么| 鼻窦炎的症状是什么| 晚上8点到9点是什么时辰| 霸王别姬是什么意思| 中性粒细胞数目偏高是什么意思| 满满是什么意思| 内膜b型是什么意思啊| b型和o型生的孩子是什么血型| 彤五行属什么| 黄斑病变是什么引起的| 脚趾头疼是什么原因| 筋是什么组织| 腹痛吃什么药| 呕吐是什么原因引起的| 覅是什么意思| 什么人不穿衣服| 宫颈管少量积液是什么意思| mg什么单位| 不小心怀孕了吃什么药可以流掉| 梦见尸体是什么意思| 周围神经病是什么症状| 宫商角徵羽是什么意思| 护理部是干什么的| 肉夹馍是什么肉| 风湿挂什么科室| 红参对子宫有什么作用| 下午8点是什么时辰| 淀粉酶测定是查什么| 秦皇岛是什么海| 蟊贼是什么意思| 提手旁的字有什么| 天长地久是什么生肖| 为什么会血压高| 人体自由基是什么| 黑色上衣搭配什么颜色裤子好看| 外婆家是什么菜系| 火气太旺是什么原因| der是什么意思| 铁扫帚命是什么意思| o型b型生的孩子是什么血型| 人类免疫缺陷病毒是什么| 老枞水仙属于什么茶| 虎和什么属相不合| 世界上最多笔画的字是什么| freeze是什么意思| 非食健字是什么意思| 包涵是什么意思| 贱货是什么意思| 想吃肉是身体缺什么| 媛是什么意思| 萎缩性阴道炎用什么药| 爽约是什么意思| 笋壳鱼是什么鱼| 透析病人磷高了吃什么降磷| 乔迁礼物应该送什么| 2019是什么生肖| 黄瓜籽有什么功效| 脖子粗挂什么科| 鸽子夏天喝什么水好| vvs是什么意思| 什么时候同房最容易怀孕| 夏天煲什么汤最好| 面粉可以做什么好吃的| 百字五行属什么| 猪冲蛇开什么生肖| 1月25号是什么星座| 刚怀孕吃什么最好最营养| 促胃动力药什么时候吃| 蓝莓对身体有什么好处| 旅游有什么好处| 月经一个月来两次是什么原因| rue是什么意思| 为什么会突然打嗝| 荔枝什么时候成熟| 总出汗是什么原因| 口水多吃什么药好得快| 干贝和瑶柱有什么区别| 羁押是什么意思| 月经一直不干净吃什么药| 未见明显胚芽是什么意思| 海口有什么好玩的| 滑膜炎用什么膏药好| 鹤膝风是什么病| 什么人不适合艾灸| 皮肤黑穿什么颜色的衣服好看| 小便失禁是什么原因男性| 十二指肠溃疡a1期什么意思| 我不知道你在说什么英文| 垚字五行属什么| 做梦梦到大蟒蛇是什么意思| 盐酸吗啉胍片是什么药| 自燃是什么意思| 10.25是什么星座| 什么是同人文| 灌溉是什么意思| 打疫苗前后要注意什么| 小肝癌是什么意思| 为什么梦不到死去的亲人| 性功能障碍吃什么药| 5月8号是什么日子| 胃大肚子大是什么原因| 乳酸脱氢酶高是什么原因| 女人吃黄芪有什么好处| 肺实性结节是什么意思| 老是发烧是什么原因| 阴险表情什么意思| 小猫的尾巴有什么用处| 欣字取名什么寓意| 为什么眼睛老是流泪| 鼻基底填充用什么材料比较好| 耸是什么意思| 道心是什么意思| 静脉曲张什么症状| 辣椒什么时候种| classic是什么意思| 小柴胡颗粒治什么病| 结甲是什么病| 把妹什么意思| hc是什么意思| 龙配什么生肖最好| 检查骨密度挂什么科| 什么是疤痕增生| 收官是什么意思| 尿里带血是什么原因| 亦金读什么| 质变是什么意思| 梦遗是什么| 什么的亮光| lsil是什么意思| 吃什么补脾| 女人是什么| 月经期间头疼是什么原因| 医美是什么| 促进钙吸收吃什么| 需要是什么意思| 过敏擦什么药膏好得快| 白芍的功效与作用是什么| 尿液中粘液丝高是什么原因| 7月7日是什么星座| 什么叫前列腺钙化| 皮肤疖是什么病| 35岁月经量少是什么原因| 古代新疆叫什么| 滇红属于什么茶| 猪横利是什么| 半盏流年是什么意思| 致什么意思| 众星捧月是什么意思| 今年温度为什么这么高| 首套房有什么优惠政策| 墨龟为什么只能养一只| 下面长痘痘是什么原因| 陈皮有什么作用| 买二手苹果手机要注意什么| 放屁是热的是什么原因| 你是什么动物| 经常梦遗是什么原因| dym是什么意思| 痘痘肌肤适合用什么牌子的护肤品| 手不释卷的释是什么意思| 胃疼买什么药| 五行属木缺什么| 左手指头麻木是什么原因| 狐假虎威告诉我们什么道理| 糯米是什么米| 柠檬茶喝了有什么好处| 水痘疫苗什么时候接种| 什么是脑梗死| 口甜是什么原因引起的| 香槟是什么酒| 炉中火是什么意思| 独在异乡为异客的异是什么意思| 自然流产的症状是什么样的| 低度鳞状上皮内病变是什么意思| 乙酉是什么意思| st是什么意思| 5月26日什么星座| 健身后应该吃什么| 梦见抓甲鱼是什么意思| 七月份有什么节日吗| 一进门见到什么植物好| 5s是什么| 越睡越困是什么原因| 7月15日是什么节日| mect是什么意思| 威图手机为什么那么贵| 皮炎是什么| 四大发明有什么| 以身相许什么意思| 獭尾肝是什么意思| 鱼加完念什么| 肝气不舒吃什么中成药| 大校上面是什么军衔| 入伏天是什么意思| 脱节是什么意思| mac是什么牌子口红| 山楂泡酒有什么功效| 什么是气溶胶| 摩羯座是什么星象| 脸上长痘是什么原因| drgs付费是什么意思| 丰胸吃什么| 胆结石是什么原因导致的| 阴道口瘙痒用什么药| 肿瘤挂什么科| 梦到迁坟是什么意思| 羊水破了是什么感觉| 皑皑是什么意思| 3475是什么罩杯| 晋是什么意思| 骨骼是什么意思| ber什么意思| 梦见上楼梯是什么意思| 省公安厅副厅长是什么级别| 中药为什么要熬两次| 1988属什么生肖| 打火机里的液体是什么| 为什么叫老鸨| 残留是什么意思| 玩得什么| 下午一点是什么时辰| 高血压是什么意思| 乳腺结节钙化是什么意思| 淋巴结是什么原因引起的| 肠癌有什么症状| 用什么拖地最干净| 雷达表属于什么档次| 做梦捡到钱是什么意思| 小孩口臭吃什么药效果最好| 内分泌失调吃什么药效果最好| 子宫长什么样子图片| 色散是什么意思| 出家人是什么意思| 甲状腺挂什么科| 武装部部长是什么级别| 玳瑁色是什么颜色| 为什么闰月| 儿童受凉咳嗽吃什么药| 百度
Skip to main content
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more. View results.

台媒:花莲强震牵动两岸 大陆网友要捐款“跨海送暖”

(1) Removed decoration cost from total count. (2) Added faster version.
Source Link

Perl 5 -pl, 109103 bytes

chomp;@@,=$s=$_;/((.)(?1)\2|(.)(.)\4?\3)?(??{$1?push@,,$`.$':length$s>y!!!c?$s=$_:1;0})/,$_=pop@,while@,;$_=$s

Try it online!

Speed is not great. I'd claim further "-6" from the score -- chomping is only required for the "nice" TIO's many-inputs-in-the-same-screen presentation, not for an input of a single string w/o trailing LF (the same about "-l" switch.)Try it online!

More readable:

chomp;
@, = $s = $_;
/
    ( (.)(?1)\2 | (.)(.)\4?\3 )?
    (??{ 
        $1 ? push @,, $` . $'
           : length $s > y!!!c ? $s = $_ : 1;
        0
    })
/x,
$_ = pop @, while @,;
$_ = $s

Perl 5, (non-competing) 458 bytes

$s = $_;
%seen = ();
while () {
    /
        (?>^.*?)
        ( 
            (
                (.)(?-3)\g-1|(.)(.)\g-1?\g-2 
            )
            (?{ 
                $x = substr( $_, 0, $-[2] ) . substr( $_ , $+[2] );
                unless ( $seen{ $x } ++ ) {
                    push @a, $x;
                    $s = $x if length( $s ) > length( $x )
                }
            })
        )
    /x;
    last unless @a;
    $_ = pop @a
}
$_ = $s;

Try it online!

Short version is terribly inefficient. Just for fun, this is a much faster version (approx. 1 sec for 16 "go"'s in linked TIO's input vs. 9 in the challenge's test case), which hopefully generates correct results.

Perl 5 -pl, 109 bytes

chomp;@,=$s=$_;/((.)(?1)\2|(.)(.)\4?\3)?(??{$1?push@,,$`.$':length$s>y!!!c?$s=$_:1;0})/,$_=pop@,while@,;$_=$s

Try it online!

Speed is not great. I'd claim further "-6" from the score -- chomping is only required for the "nice" TIO's many-inputs-in-the-same-screen presentation, not for an input of a single string w/o trailing LF (the same about "-l" switch.)

More readable:

chomp;
@, = $s = $_;
/
    ( (.)(?1)\2 | (.)(.)\4?\3 )?
    (??{ 
        $1 ? push @,, $` . $'
           : length $s > y!!!c ? $s = $_ : 1;
        0
    })
/x,
$_ = pop @, while @,;
$_ = $s

Perl 5 -pl, 103 bytes

@,=$s=$_;/((.)(?1)\2|(.)(.)\4?\3)?(??{$1?push@,,$`.$':length$s>y!!!c?$s=$_:1;0})/,$_=pop@,while@,;$_=$s

Try it online!

More readable:

@, = $s = $_;
/
    ( (.)(?1)\2 | (.)(.)\4?\3 )?
    (??{ 
        $1 ? push @,, $` . $'
           : length $s > y!!!c ? $s = $_ : 1;
        0
    })
/x,
$_ = pop @, while @,;
$_ = $s

Perl 5, (non-competing) 458 bytes

$s = $_;
%seen = ();
while () {
    /
        (?>^.*?)
        ( 
            (
                (.)(?-3)\g-1|(.)(.)\g-1?\g-2 
            )
            (?{ 
                $x = substr( $_, 0, $-[2] ) . substr( $_ , $+[2] );
                unless ( $seen{ $x } ++ ) {
                    push @a, $x;
                    $s = $x if length( $s ) > length( $x )
                }
            })
        )
    /x;
    last unless @a;
    $_ = pop @a
}
$_ = $s;

Try it online!

Short version is terribly inefficient. Just for fun, this is a much faster version (approx. 1 sec for 16 "go"'s in linked TIO's input vs. 9 in the challenge's test case), which hopefully generates correct results.

Rollback to Revision 2
Source Link

Perl 5 -pl, 102109 bytes

@chomp;@,=$s=$_;/((.)(?1)\2|(.)(.)\4?\3)?(??{$1?push@,,$`.$':$s=~slength$s>y!${\y^^.^cr}.*!$_!c?$s=$_:1;0})/,$_=pop@,while@,;$_=$s

Try it online!Try it online!

Speed is not great. I'd claim further "-6" from the score -- chomping is only required for the "nice" TIO's many-inputs-in-the-same-screen presentation, not for an input of a single string w/o trailing LF (the same about "-l" switch.)

More readable:

chomp;
@, = $s = $_;
/
    ( (.)(?1)\2 | (.)(.)\4?\3 )?
    (??{ 
        $1 ? push @,, $` . $'
           : length $s =~> sy!!!c ${? \$s y^^.^cr= }$_ .*: !$_!x1;
        0
    })
/x,
$_ = pop @, while @,;
$_ = $s

Perl 5 -pl, 102 bytes

@,=$s=$_;/((.)(?1)\2|(.)(.)\4?\3)?(??{$1?push@,,$`.$':$s=~s!${\y^^.^cr}.*!$_!})/,$_=pop@,while@,;$_=$s

Try it online!

More readable:

@, = $s = $_;
/
    ( (.)(?1)\2 | (.)(.)\4?\3 )?
    (??{ 
        $1 ? push @,, $` . $'
           : $s =~ s! ${ \ y^^.^cr } .* !$_!x
    })
/x,
$_ = pop @, while @,;
$_ = $s

Perl 5 -pl, 109 bytes

chomp;@,=$s=$_;/((.)(?1)\2|(.)(.)\4?\3)?(??{$1?push@,,$`.$':length$s>y!!!c?$s=$_:1;0})/,$_=pop@,while@,;$_=$s

Try it online!

Speed is not great. I'd claim further "-6" from the score -- chomping is only required for the "nice" TIO's many-inputs-in-the-same-screen presentation, not for an input of a single string w/o trailing LF (the same about "-l" switch.)

More readable:

chomp;
@, = $s = $_;
/
    ( (.)(?1)\2 | (.)(.)\4?\3 )?
    (??{ 
        $1 ? push @,, $` . $'
           : length $s > y!!!c ? $s = $_ : 1;
        0
    })
/x,
$_ = pop @, while @,;
$_ = $s
(1) Removed decoration cost from total count. (2) Only a single character less for now, we'll see if below 100 can be reached. (3) Fixed the speed issue -- see the long test case at TIO (usual palindrome, 4 other copies inserted at random positions, hence blank output for it).
Source Link

Perl 5 -pl, 109102 bytes

chomp;@@,=$s=$_;/((.)(?1)\2|(.)(.)\4?\3)?(??{$1?push@,,$`.$':length$s>y$s=~s!${\y^^.^cr}.*!$_!c?$s=$_:1;0})/,$_=pop@,while@,;$_=$s

Try it online!

Speed is not great. I'd claim further "-6" from the score -- chomping is only required for the "nice" TIO's many-inputs-in-the-same-screen presentation, not for an input of a single string w/o trailing LF (the same about "-l" switch.)Try it online!

More readable:

chomp;
@, = $s = $_;
/
    ( (.)(?1)\2 | (.)(.)\4?\3 )?
    (??{ 
        $1 ? push @,, $` . $'
           : length $s >=~ y!!s!c ? $s = $_ : 1;
   ${ \ y^^.^cr } .* 0!$_!x
    })
/x,
$_ = pop @, while @,;
$_ = $s

Perl 5 -pl, 109 bytes

chomp;@,=$s=$_;/((.)(?1)\2|(.)(.)\4?\3)?(??{$1?push@,,$`.$':length$s>y!!!c?$s=$_:1;0})/,$_=pop@,while@,;$_=$s

Try it online!

Speed is not great. I'd claim further "-6" from the score -- chomping is only required for the "nice" TIO's many-inputs-in-the-same-screen presentation, not for an input of a single string w/o trailing LF (the same about "-l" switch.)

More readable:

chomp;
@, = $s = $_;
/
    ( (.)(?1)\2 | (.)(.)\4?\3 )?
    (??{ 
        $1 ? push @,, $` . $'
           : length $s > y!!!c ? $s = $_ : 1;
        0
    })
/x,
$_ = pop @, while @,;
$_ = $s

Perl 5 -pl, 102 bytes

@,=$s=$_;/((.)(?1)\2|(.)(.)\4?\3)?(??{$1?push@,,$`.$':$s=~s!${\y^^.^cr}.*!$_!})/,$_=pop@,while@,;$_=$s

Try it online!

More readable:

@, = $s = $_;
/
    ( (.)(?1)\2 | (.)(.)\4?\3 )?
    (??{ 
        $1 ? push @,, $` . $'
           : $s =~ s! ${ \ y^^.^cr } .* !$_!x
    })
/x,
$_ = pop @, while @,;
$_ = $s
(1) Removed "recursion" blah-blah (challenge was re-worded). (2) Was too optimistic about use of "pos" instead of "y///c" (another test case at TIO); added 2 bytes. (3) But removed a little more bytes overall.
Source Link
Loading
Source Link
Loading
烂仔是什么意思 澳大利亚有什么特产 ntr是什么意思啊 座驾是什么意思 perrier是什么水
葡萄球菌用什么抗生素 什么叫抗氧化 国药准字号是什么意思 佝偻病是什么症状 赤豆是什么豆
肝胆湿热吃什么药 笋壳鱼是什么鱼 哈密瓜为什么会苦 慢性荨麻疹是什么症状 关东煮是什么
得了便宜还卖乖是什么意思 全身是宝的动物是什么生肖 什么人适合喝蛋白粉 花白鲢喂养什么长得快 什么地散步
特异性生长因子指什么hcv8jop2ns5r.cn 为什么脸一边大一边小hcv8jop6ns3r.cn 金不换是什么意思hcv7jop4ns5r.cn 2月18是什么星座hcv7jop9ns9r.cn 涤是什么面料dayuxmw.com
金匮肾气丸适合什么人吃yanzhenzixun.com 水洗标是什么hcv8jop0ns3r.cn 曹操是个什么样的人hcv7jop5ns6r.cn 口犬读什么wuhaiwuya.com 任正非用的什么手机bfb118.com
牛尾炖什么最好tiangongnft.com 胃酸是什么原因xjhesheng.com 孕妇吸二手烟对胎儿有什么影响hcv7jop4ns6r.cn 小孩突然头疼是什么原因hcv8jop5ns5r.cn 雀神是什么意思hcv7jop7ns1r.cn
bb霜是什么hcv7jop9ns0r.cn 性格好的女生是什么样hcv8jop7ns6r.cn 什么是性行为youbangsi.com 十五的月亮十六圆是什么意思hcv8jop9ns0r.cn 什么宽带网速快又便宜hcv9jop1ns7r.cn
百度