16 lines
283 B
C
16 lines
283 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
|
||
|
int main () {
|
||
|
int sum = 0;
|
||
|
unsigned int p1,p2,r1,r2 = 0;
|
||
|
|
||
|
while (scanf("%u-%u,%u-%u\n", &p1,&p2,&r1,&r2) != EOF) {
|
||
|
if (((p1 <= r1) && (p2 >= r2)) || ((p1 >= r1) && (p2 <= r2)))
|
||
|
sum +=1;
|
||
|
}
|
||
|
printf("%d\n", sum);
|
||
|
|
||
|
}
|