16 lines
337 B
C
16 lines
337 B
C
|
#include <stdio.h>
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
int a1,a2,b1,b2;
|
||
|
int overlaps = 0;
|
||
|
while (scanf("%d-%d,%d-%d", &a1, &a2, &b1, &b2) != EOF)
|
||
|
{
|
||
|
// printf("%d-%d,%d-%d", a1, a2, b1, b2);
|
||
|
if ( ((a1 >= b1) && (a2 <= b2)) || ((b1 >= a1) && (b2 <= a2))) {
|
||
|
overlaps++;
|
||
|
}
|
||
|
}
|
||
|
printf("%d\n", overlaps);
|
||
|
}
|