1458: Booking
Time Limit: 3 Sec Memory Limit:
128 MB
Submit: 116 Solved: 27
[Submit][Status][Web
Board]
Description

Input

Output

Sample Input
4
2 120
1 2013-07-01 15:59 2013-07-08 16:30
2 2013-07-08 17:30 2013-07-15 12:00
3 60
65 2013-07-08 14:30 2013-07-08 16:00
32 2013-07-01 16:00 2013-07-15 12:00
91 2013-07-01 16:00 2013-07-08 15:00
2 360
a7 2016-02-21 14:00 2016-02-28 21:00
xx 2016-03-01 01:00 2016-03-02 12:57
2 60
a9 2016-02-21 14:00 2016-02-28 11:00
a8 2016-02-28 12:00 2016-03-11 21:00
Sample Output
2
3
1
1
題意:開房的預定時間和離開時間,下一個要重新開一間那麼這次預定時間必須要在前面開房的離開時+打掃時間之內。
#include
#include
#include
using namespace std;
typedef struct nnn
{
int st;
int et;
}node;
node book[5005];
int cmp(node a,node b)
{
if(a.st==b.st)
return a.et