永发信息网

英语翻译是浙大ACM题库的题目 看不懂Crazy SearchTime Limit:5 Seconds Memory L

答案:1  悬赏:40  手机版
解决时间 2021-08-14 12:17
英语翻译
是浙大ACM题库的题目 看不懂
Crazy Search
Time Limit:5 Seconds Memory Limit:32768 KB
Many people like to solve hard puzzles some of which may lead them to madness.One such puzzle could be finding a hidden prime number in a given text.Such number could be the number of different substrings of a given size that exist in the text.As you soon will discover,you really need the help of a computer and a good algorithm to solve such a puzzle.
Your task is to write a program that given the size,N,of the substring,the number of different characters that may occur in the text,NC,and the text itself,determines the number of different substrings of size N that appear in the text.
As an example,consider N=3,NC=4 and the text daababac.The different substrings of size 3 that can be found in this text are:daa,aab,aba,bab,bac.Therefore,the answer should be 5.
Input
The first line of input consists of two numbers,N and NC,separated by exactly one space.This is followed by the text where the search takes place.You may assume that the maximum number of substrings formed by the possible set of characters does not exceed 16 Millions.
Output
The program should output just an integer corresponding to the number of different substrings of size N found in the given text.
This problem contains multiple test cases!
The first line of a multiple input is an integer N,then a blank line followed by N input blocks.Each input block is in the format indicated in the problem description.There is a blank line between input blocks.
The output format consists of N output blocks.There is a blank line between output blocks.
Sample Input
1
3 4
daababac
Sample Output
5
Intervals
Time Limit:10 Seconds Memory Limit:32768 KB
You are given n closed,integer intervals [ai,bi] and n integers c1,...,cn.
Write a program that:
> reads the number of intervals,their endpoints and integers c1,...,cn from the standard input,
> computes the minimal size of a set Z of integers which has at least ci common elements with interval [ai,bi],for each i = 1,2,...,n,
> writes the answer to the standard output.
Input
The first line of the input contains an integer n (1
最佳答案

先帮你翻一个.
Crazy Search
疯狂搜索
Time Limit:5 Seconds Memory Limit:32768 KB
时限:5秒 内存限制:32768KB
Many people like to solve hard puzzles some of which may lead them to madness.One such puzzle could be finding a hidden prime number in a given text.Such number could be the number of different substrings of a given size that exist in the text.As you soon will discover,you really need the help of a computer and a good algorithm to solve such a puzzle.
许多人想解决难题,其中一些可能会让他们疯狂.一个这样的难题就是找到一个隐藏在给定文本中的质数.这个数字可以是一个存在于这个文本中指定长度的不同子串数.你需要计算机和一个好的算法来帮助你解决这样一个难题.
Your task is to write a program that given the size,N,of the substring,the number of different characters that may occur in the text,NC,and the text itself,determines the number of different substrings of size N that appear in the text.
你的任务是写这样一个程序:给定子串大小N,文本中不同字符的数量NC,和文本,来确定出现在文本中大小为N的不同子串数目.
As an example,consider N=3,NC=4 and the text daababac.The different substrings of size 3 that can be found in this text are:daa,aab,aba,bab,bac.Therefore,the answer should be 5.
比如:假设N为3,NC为4,文本为daababac.这里不同子串大小为3,为daa,aab,aba,bab,bac.因此,答案应该是5.
Input
输入
The first line of input consists of two numbers,N and NC,separated by exactly one space.This is followed by the text where the search takes place.You may assume that the maximum number of substrings formed by the possible set of characters does not exceed 16 Millions.
输入的第一行包括两个数字:N和NC,它们之间用一个空格隔开.接下来是搜索所用文本.你假设字符集合构成的子串数量最大不超过1600万
Output
输出
The program should output just an integer corresponding to the number of different substrings of size N found in the given text.
程序应输出一个整数,它是文本中找到的大小为N的不相同子串的数量
This problem contains multiple test cases!
该问题包含多种测试用例!
The first line of a multiple input is an integer N,then a blank line followed by N input blocks.Each input block is in the format indicated in the problem description.There is a blank line between input blocks.
多行输入的第一行是整数N,然后一个空行,接下来是N个输入段.每个段是以问题描述中的格式表示的.在输入各段之间有一个空行.
The output format consists of N output blocks.There is a blank line between output blocks.
输出格式包含N个输出段.两段之间有一个空行.
Sample Input
范例输入
1
3 4
daababac
Sample Output
范例输出
5
Intervals
间隔
Time Limit:10 Seconds Memory Limit:32768 KB
时限:10秒 内存限制:32769KB
You are given n closed,integer intervals [ai,bi] and n integers c1,...,cn.
给你n个闭区间整数[ai,bi]和n个整数,c1...,cn
Write a program that:
写一个程序
> reads the number of intervals,their endpoints and integers c1,...,cn from the standard input,
读入间隔数量,结束点,从标准输入得到整数c1,...cn
> computes the minimal size of a set Z of integers which has at least ci common elements with interval [ai,bi],for each i = 1,2,...,n,
计算整数集合Z的最小长度,这个集合至少包括ci个公共元素,这些元素都在[ai,bi]区间内,i=1,2,...,n.
> writes the answer to the standard output.
用标准输出写出答案
Input
输入
The first line of the input contains an integer n (1


我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
12星座的属性是什么
QQ飞车里最帅、最好的车
爱德华 和贝拉的关系
历下区济南金三色棋牌在什么地方啊,我要过去
张湾区十堰羽翔羽毛球俱乐部在什么地方啊,我
求购天龙八部独孤九剑50能带的外功BB
在直播怎么赚钱,手机直播游戏,哪个软件赚钱
有没有什么练习快速听力的好方法?
长和短英语单词怎么写
义乌到阜阳的火车中途经不经过嘉兴!
金圣多少钱一包
muse的中文意思是什么?
送朋友上大学、我想送他一本励志的书、有没好
CF怎样连跳上箱子
粉末式样A是由等物质的量的MgO,Fe2O3组成的混
推荐资讯
九零后做事真让别人厌烦吗?为什么现在网上有
1至9之间哪个数字最懒,哪个数字最勤快?
老千腾飞的博客为什么被封杀
现在南拳妈妈有什麽好听的新歌啊?
想取一个商店名称
『求带练』有人玩天龙八部华东一区上海滩吗,
掇刀区荆门荆楚串婆婆砂锅串串香在什么地方啊
娃娃已经一岁多了,可每晚总是大哭,每晚都要
QQ幻想世界这样的签名是怎么弄的
1)阅读《伊索寓言》中“狐狸和葡萄”的故事,
肌肉酸痛,怎么缓解…
路由器哪个懂??
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?