TIANKENG’s restaurant】的更多相关文章

TIANKENG’s restaurant Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 1360    Accepted Submission(s): 545 Problem Description TIANKENG manages a restaurant after graduating from ZCMU, and tens…
称号: TIANKENG's restaurant Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others) Total Submission(s): 249    Accepted Submission(s): 125 Problem Description TIANKENG manages a restaurant after graduating from ZCMU, and t…
TIANKENG's restaurant Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others) Total Submission(s): 0    Accepted Submission(s): 0 Problem Description TIANKENG manages a restaurant after graduating from ZCMU, and tens of t…
TIANKENG’s restaurant(Ⅱ) Time Limit: 16000/8000 MS (Java/Others)    Memory Limit: 130107/65536 K (Java/Others)Total Submission(s): 456    Accepted Submission(s): 149 Problem Description After improving the marketing strategy, TIANKENG has made a fort…
TIANKENG’s restaurant(Ⅱ) Time Limit: 16000/8000 MS (Java/Others)    Memory Limit: 130107/65536 K (Java/Others)Total Submission(s): 466    Accepted Submission(s): 153 Problem Description After improving the marketing strategy, TIANKENG has made a fort…
TIANKENG manages a restaurant after graduating from ZCMU, and tens of thousands of customers come to have meal because of its delicious dishes. Today n groups of customers come to enjoy their meal, and there are Xi persons in the ith group in sum. As…
Description TIANKENG manages a restaurant after graduating from ZCMU, and tens of thousands of customers come to have meal because of its delicious dishes. Today n groups of customers come to enjoy their meal, and there are Xi persons in the ith grou…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4883 解题报告:一家餐馆一天中有n波客人来吃饭,第 i 波  k 客人到达的时间是 s ,离开时的时间是e,求出餐馆最多的时候有多少人? 一开始我用线段树写的,但是RE了,后来看到一种方法,感觉很巧妙:一天时间全部转化成分钟,范围就是从0到1440,全部初始化为0,然后如果在s时间有k个 客人来的时候就在数组的s位置+k,然后在离开的时间e位置-k,最后扫一边数组,扫的过程中不断判断最大值. #in…
Problem B:http://codeforces.com/contest/616/problem/B B. Dinner with Emma 题意:一对夫妻要去餐厅吃晚饭,Emma 想去最豪华(贵)的地方吃,Jack想去最朴素(便宜)的地方吃,于是两人用这个方法决定去哪吃:每个街道和大道的交叉口上有一个餐厅,给出n街道m大道,所以每一条街道上有m个餐厅,由Emma选街道,由Jack选餐馆,(反正Jack会选择Emma选的街道中最便宜的一家)输出最终决定去的餐馆价格. 思路:既然Jack要选…
链接:pid=4883">带我学习.带我飞 第一次BC,稳挂,WA n多次.今天又一次做了一下 略挫 #include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <map> #include <string> #include <vector> #include <set> #inclu…
有一组数据是在客人到达和出发时间,问:多少把椅子的能力,以满足所有客人的需求,可以有一个地方坐下要求. 有些人甚至开始考虑暴力法,这些数据是少,其实这个问题很多数据, 暴力需求O(n*n)的时间效率,显然,将加班,因此,有必要O(n) 或O(nlgn)算法. 属于一道想透了就很easy的,可是没想过就会很困难的题目. 解法是: 把全部客人到来和离开的时间都排成序列.每次客人到来须要n张桌椅,那么就+上n,每次客人离开就会返还n张桌椅,那么就-去n,求这种最大值. 详细算法代码就那么几行,处理IO…
题意: 1.找一个字符串s使得 s不是给定母串的子串 2.且s要最短 3.s在最短情况下字典序最小 hash.,,结果t掉了...加了个姿势怪异的hash值剪枝才过.. #include <cstdio> #include <cstdlib> #include <map> #include <set> #include <algorithm> #include <cstring> #include <iostream> #…
不得不说,bastcoder是个hack游戏啊.!. 题意:求最少要多少张椅子才干让全部来的客人有地方坐!! 就是一个区间的处理吧!!!和HDU  1556 我待水似流年.流年待我似水神似! ..! 求的是重叠的区间最大,我们仅仅要标记每一个区间会有多少人就能够了! ! ! 然后在从0到1440分统计就OK了.! AC代码例如以下: #include<iostream> #include<cstdio> #include<cmath> #include<map&g…
TIANKENG’s restaurant Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 1629    Accepted Submission(s): 588 Problem Description TIANKENG manages a restaurant after graduating from ZCMU, and tens…
链接:http://acm.hdu.edu.cn/showproblem.php?pid=4883 TIANKENG’s restaurant Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 566    Accepted Submission(s): 267 Problem Description TIANKENG manages a…
TIANKENG’s restaurant http://acm.hdu.edu.cn/showproblem.php?pid=4883 竟然暴力1.44*10^7  还要*T=100  竟然过了 #include<cstdio> #include<cstring> #include<algorithm> #define mt(a,b) memset(a,b,sizeof(a)) using namespace std; ; int sum[M]; int main()…
TIANKENG's restaurant Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others) Total Submission(s): 1760    Accepted Submission(s): 635 Problem Description TIANKENG manages a restaurant after graduating from ZCMU, and tens…
A - 项目管理HDU4858 /* 题意: 这个项目有n个节点, 两个节点间可能有多条边,不过一条边的两端必然是不同的节点. 0的时候:接下来两个数u v表示给项目u的能量值加上v: 1的时候: 这题就是有多少出去的边数[出度],就加上对面的点的能量值,输出和 只是这题如果用矩阵,内存就炸了.所以我们使用vector 我们用vector[u]=v;vector[v]=u; */ #include <stdio.h> #include <iostream> #include <…
http://codeforces.com/problemset/problem/261/B 题目大意:给定n个数a1-an(n<=50,ai<=50),随机打乱后,记Si=a1+a2+a3-+ai,问满足Si<=p的i的最大值的期望.(p<=50) (大意来自于http://www.cnblogs.com/liu-runda/p/6253569.html) 我们知道,全排列其实等价于我们一个一个地等概率地向一个序列里面插入数值 所以我们可以这么看这道题: 现在有n个数,有n个盒子…
Flo's Restaurant Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 932    Accepted Submission(s): 285 Problem DescriptionSick and tired of pushing paper in the dreary bleary-eyed world of finance,…
TIANKENG's rice shop 题目链接: http://acm.hust.edu.cn/vjudge/contest/123316#problem/J Description TIANKENG managers a pan fried rice shop. There are n kinds of fried rice numbered 1-n. TIANKENG will spend t time for once frying. Because the pan is so sma…
B. Restaurant Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/597/problem/B Description A restaurant received n orders for the rental. Each rental order reserve the restaurant for a continuous period of time, the i-th order…
Problem Description TIANKENG managers a pan fried rice shop. There are n kinds of fried rice numbered 1-n. TIANKENG will spend t time for once frying. Because the pan is so small, TIANKENG can fry k bowls of fried rice with same kind at most. Assumin…
http://acm.hdu.edu.cn/status.php Alfredo's Pizza Restaurant Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1732    Accepted Submission(s): 1023 Problem Description Traditionally after the Loca…
Problem Description Traditionally after the Local Contest, judges and contestants go to their favourite restaurant, Alfredos Pizza Restaurant. The contestants are really hungry after trying hard for five hours. To get their pizza as quickly as possib…
题目链接:hdu 4885 TIANKENG's travel 题目大意:给定N,L,表示有N个加油站,每次加满油能够移动距离L,必须走直线,可是能够为斜线.然后给出sx,sy,ex,ey,以及N个加油站的位置,问说最少经过几个加油站,路过不加油也算. 解题思路:一開始以为经过能够不算,所以o(n2)的复杂度建图,然后用bfs求最短距离,结果被FST了. 将点依照x坐标排序,这样在建图是保证当前点为最左点,每次建立一条边的时候,将该边的斜率记录,下次有同样的斜率则不加边,斜率能够用两个整数表示,…
Restaurant Time Limit:4000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Description A restaurant received n orders for the rental. Each rental order reserve the restaurant for a continuous period of time, the i-th order…
凉心模拟D1T1--最简单的一道题 TAT 餐馆(restaurant) 题目背景 铜企鹅是企鹅餐馆的老板,他正在计划如何使得自己本年度收益增加. 题目描述 共有n 种食材,一份食材i 需要花ti 小时不间断地进行播种,施肥, 直至收获.当然,一份食材i 是可以直接卖掉得到wi 块钱的. 招牌菜共有m 种,一份招牌菜i 需要消耗一定的食材,花Ti 小时不 间断地来烹饪,叫卖,并最终卖出得到Wi 块钱. 整个季度换算下来一共有Tmax 小时可供你使用,铜企鹅需要在这期间 赚到最多的钱,这样他才有足…
A. Restaurant Tables time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output In a small restaurant there are a tables for one person and b tables for two persons. It it known that n groups of peopl…
1 餐馆(restaurant) 1.1 题目背景 铜企鹅是企鹅餐馆的老板,他正在计划如何使得自己本年度收益增加. 1.2 题目描述 共有n 种食材,一份食材i 需要花ti 小时不间断地进行播种,施肥, 直至收获.当然,一份食材i 是可以直接卖掉得到wi 块钱的. 招牌菜共有m 种,一份招牌菜i 需要消耗一定的食材,花Ti 小时不 间断地来烹饪,叫卖,并最终卖出得到Wi 块钱. 整个季度换算下来一共有Tmax 小时可供你使用,铜企鹅需要在这期间 赚到最多的钱,这样他才有足够多的钱来steam 剁…