题目链接: http://poj.org/problem?id=3829 题意描述: 输入矩阵的大小n和m,以及来占位置的人数k 输入n*m的教室座位矩阵,每个值表示该座位的满意度 输入每个人来占位置的时间和需要几个位置h,m,q 计算并输出每个来占位置的人根据占位规则得到的坐标zx,zy,若一个位置都没有了,输出-1. 规则: 首先看有没有在同一行上的连续的k个座位,有则这个占位的同学坐在这连续k个座位的最左边,如果有多行上都存在连续的k个位置,则该占位的同学会选择最左边值最大的位置(坑点就在…
Description Students often have problems taking up seats. When two students want the same seat, a quarrel will probably begin. It will have very bad effect when such subjects occur on the BBS.  So, we urgently need a seat-taking-up rule. After severa…
Description Students often have problems taking up seats. When two students want the same seat, a quarrel will probably begin. It will have very bad effect when such subjects occur on the BBS. So, we urgently need a seat-taking-up rule. After several…
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=3262 题意:教室有n*m个座位,每个座位有一个舒适值,有K个学生在不同时间段进来,要占t个座位,必须是连续的并且自己坐在最左边,如果有多个的话,找最舒适的座位,如果没有连续t个,那么只给自己找个最舒适的位子,如果都满的话,输出-1. 题解:一个简单的搜索模拟,注意的是,要排序每个同学进来的时间,而且输出要按照给的顺序输出,被坑了几次,样例数据太弱了. AC代码: #include <iostream>…
永恒的大牛,kuangbin,膜拜一下,Orz 链接:http://www.cnblogs.com/kuangbin/archive/2013/04/23/3039313.html Musical Theme Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 14334   Accepted: 4945 Description A musical melody is represented as a sequence of…
Milk PatternsTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://poj.org/problem?id=3261 Description Farmer John has noticed that the quality of milk given by his cows varies from day to day. On further investigation, he discovered that although he c…
Musical Theme Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 14874   Accepted: 5118 Description A musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing a key on the…
题目链接: PKU:http://poj.org/problem?id=3654 ZJU:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2936 HDU:http://acm.hdu.edu.cn/showproblem.php?pid=2723 Description The Tyrell corporation uses a state-of-the-art electronic document system th…
Frogger Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Submit Status Practice POJ 2253 Description Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone…
Musical Theme Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 22499   Accepted: 7679 Description A musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing a key on the…