문제
Problem 4: Learning by Example [Brian Dean, 2014]
Farmer John has been reading all about the exciting field of machine learning, where one can learn interesting and sometimes unexpected patterns by analyzing large data (he has even started calling one of the fields on his farm the "field of machine learning"!). FJ decides to use data about his existing cow herd to build an automatic classifier that can guess whether a cow will have spots or not.
Unfortunately, FJ hasn't been very good at keeping track of data about his cows. For each of his N cows
FJ wants to test his new automatic spot predictor on a group of new cows that are just arriving at his farm. After weighing these cows, he sees that the new shipment of cows contains a cow of every integer weight between A and B (inclusive). Please determine how many of these cows will be classified as having spots, using FJ's new classifier. Note that the classifier only makes decisions using data from FJ's N existing cows, not any of the new cows. Also note that since A and B can both be quite large, your program will not likely run fast enough if it loops from A to B counting by ones.
입력
The first line of the input contains three integers N, A, and B
출력
A single integer giving the number of incoming cows that FJ's algorithm will classify as having spots. In the example shown here, the incoming cows of weights
예제1
3 1 10
S 10
NS 4
S 1
6