NYOJ-1036 African Children __nyoj

Source: Internet
Author: User
African ChildrenTime limit: 1000 ms | Memory limit: 65535 KB Difficulty: 2 The children who lived in Africa were very dark. Why, then?
First, they are located in the tropics with severe solar radiation.
Second, they don't often bathe. (Perennial lack of water, how to bathe.) )
Now, in an African tribe, they have only one place to bathe, and the bath time is short, and there is wood in the moment. (This is also no way, lack of water ah.) )
Each child has a period of time to bathe. And, they can be washed together (whether you are a boy or a girl).
So, what time to bathe, who should come to wash, who decided. That must be their great "bath" God. "Bath" God has a timetable that records the children of the tribe, when the time can take a bath. Now, "bath" God wants to ask you, in one day, he needs to open and shut down how many times a shower faucet. Because, opening and closing a faucet once is very laborious, even, this is also instantaneous completes.
Enter multiple sets of data
The first line is a 0<n<=100.
Next n rows, one time period per line. H1H1:M1M1-H2H2:M2M2,24-hour system.
Ensure that the time period is within a day. However, there is no guarantee that h1h1:m1m1 before the h2h2:m2m2. The output topic describes how many taps the "shower" God needs to turn on and off at least once. Sample input
1
00:12-12:12
2
00:12-12:12
14:00-12:00
Sample output
1
1
Tip Ps: Turn on and off for once



Similar to NYOJ-891, range.


#include <iostream> 02. #include <algorithm> 03. using namespace Std; struct node 05. {h1,h2,m1,m2 int; }B[110]; -BOOL CMP (node A1,node a2) 09. {a1.h2<a2.h2; return 11.} 12. int main () 13. {14.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.