hdoj1050 Moving Tables(贪心)】的更多相关文章

Moving Tables Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 28304   Accepted: 9446 Description The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200…
 Moving Tables Time Limit: 1 Sec  Memory Limit: 64 MB Submit: 1182  Solved: 563 Description The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms each on the…
解题思路: 这种做法是基于hdu2037的做法上考虑的,找出所有可以同时搬运的桌子,然后就很方便求出最短总时间. 还有一种更简单的做法是直接遍历一遍找出与别的重复次数最多的那片区域,重复次数*10就可以得到结果. Moving Tables Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 28033    Accepted Submis…
Moving Tables Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 45555    Accepted Submission(s): 14817 Problem Description The famous ACM (Advanced Computer Maker) Company has rented a floor of a…
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=1050 题意 有一条走廊,走廊两边各有200个房间,一边的房间编号是奇数,另一边是偶数.现在有n个箱子需要从一个房间移动到另一个房间,移动一个箱子需要10分钟,箱子可以同时移动,但某一段走廊每次只能移动1个箱子,比如(1,3)和(6,8)可以同时移动,而(1,5)和(6,8)不能同时移动,求最少需要多少时间可以把箱子移动完毕. 思路 先将箱子按开始的房间号由小到大排序,然后循环遍历,在遍历的过程中不断…
The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms each on the north side and south side along the corridor. Recently the Company made a plan to reform its…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1050 AC code: #include<stdio.h> #include<string.h> int m[210]; int main(void) { int t,n,i,j,st,en,ma; scanf("%d",&t); while(t--) { memset(m,0,sizeof(m)); scanf("%d",&n)…
Moving Tables Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 20302    Accepted Submission(s): 6889 Problem Description The famous ACM (Advanced Computer Maker) Company has rented a floor of a…
Moving Tables Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 24316    Accepted Submission(s): 8053 Problem Description The famous ACM (Advanced Computer Maker) Company has rented a floor of a b…
Moving Tables Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14418    Accepted Submission(s): 4939 Problem Description The famous ACM (Advanced Computer Maker) Company has rented a floor of a b…