当前位置:网站首页>466. Count The Repetitions
466. Count The Repetitions
2022-08-03 21:46:00 【51CTO】
Define S = [s,n] as the string S which consists of n connected strings s. For example, [“abc”, 3] =”abcabcabc”.
On the other hand, we define that string s1 can be obtained from string s2 if we can remove some characters from s2 such that it becomes s1. For example, “abc” can be obtained from “abdbec” based on our definition, but it can not be obtained from “acbbe”.
You are given two non-empty strings s1 and s2 (each at most 100 characters long) and two integers 0 ≤ n1 ≤ 106 and 1 ≤ n2 ≤ 106. Now consider the strings S1 and S2, where S1=[s1,n1] and S2=[s2,n2]. Find the maximum integer M such that [S2,M] can be obtained from S1.
Example:
边栏推荐
猜你喜欢
随机推荐
一文带你了解软件测试是干什么的?薪资高不高?0基础怎么学?
Pay from 0 to 1
基于支持向量机的网络⼊侵检测系统的全面调查和分类
idea2021.1.3版本如何启动多个客户端程序
【Unity3D】Tank对战
FVCOM 3D Numerical Simulation of Hydrodynamics, Water Exchange, Dispersion and Transport of Oil Spills丨FVCOM Model Watershed, Numerical Simulation Method of Marine Water Environment
深度学习怎么入门?零基础快速入门深度学习
MMA安装及使用优化
From September 1st, my country has granted zero-tariff treatment to 98% of tax items from 16 countries including Togo
1 秒完成授权,Authing 全新上线一键登录功能
什么密码,永远无法被黑客攻破?
三年黑盒测试工程师对嵌入式软件测试的理解
False label aggregation
ES、Kibana 8.0安装
【历史上的今天】8 月 3 日:微软研究院的创始人诞生;陌陌正式上线;苹果发布 Newton OS
距LiveVideoStackCon 2022 上海站开幕还有3天!
2022年全国职业院校技能大赛网络安全 B模块 任务十windows操作系统渗透测试 国赛原题
6. XML
[kali-vulnerability scanning] (2.1) Nessus lifts IP restrictions, scans quickly without results, and plugins are deleted (middle)
XSS online shooting range---Warmups









