Dating with girls(2) Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2705 Accepted Submission(s): 759 Problem Description If you have solved the problem Dating with girls(1).I think you can s…
蚂蚁的难题(三) 时间限制:2000 ms | 内存限制:65535 KB 难度:4 描述 蚂蚁终于把尽可能多的食材都搬回家了,现在开始了大厨计划. 已知一共有 n 件食材,每件食材有一个美味度 Ai 和新鲜度 Bi , 如果蚂蚁在第t时刻将第i样食材烹饪成功,则得到Ai-t*Bi 的美味指数,当然,用第i件食材做饭要花去 Ci 的时间. 众所周知,蚂蚁的厨艺不怎么样,所以他需要你设计做饭方案使得在时间 T 内完成的美味指数最大. 输入 有多组测试数据.第一行是两个正整数,表示蚂蚁的…
Problem Description Due to the curse made by the devil,Xiao Ming is stranded on a mountain and can hardly escape. This mountain is pretty strange that its underside is a rectangle which size is n∗m and every little part has a special coordinate(x,y…
Stars Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/65536 K (Java/Others) Total Submission(s): 785 Accepted Submission(s): 335 Problem Description Yifenfei is a romantic guy and he likes to count the stars in the sky. To make the p…
Just a Hook Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 22730 Accepted Submission(s): 11366 Problem Description In the game of DotA, Pudge's meat hook is actually the most horrible thing…
uva11107 题意 输入 n 个 DNA 序列,求出长度最大的字符串,使得它在超过一半的 DNA 序列中连续出现.如果有多解,按字典序输出. 分析 论文 后缀数组经典题.加深几个关键数组的印象. 和 poj2774 一样,都是要去连接字符串,保证分隔符不能和字符串内的字符相同,且不能重复. 为什么要连接呢?因为求后缀数组实际是对后缀字符串进行排序,那么有公共前缀子串的后缀字符串会尽可能的排在一起,不同的分隔符保证公共子串不会扩散到别的串上.而 height 数组对应的就是相邻 sa 数组的…
A. Cakeminator time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given a rectangular cake, represented as an r × c grid. Each cell either has an evil strawberry, or is empty. For exam…