2022-12-04 14:54:48 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main(void) {
|
|
|
|
int a, b, c, d, S = 0, G = 0;
|
|
|
|
|
2022-12-05 18:48:24 +01:00
|
|
|
while (scanf("%u-%u,%u-%u", &a, &b, &c, &d) == 4) {
|
2022-12-04 14:54:48 +01:00
|
|
|
S += (a >= c && b <= d) || (c >= a && d <= b);
|
|
|
|
G += (a <= c && b >= c) || (c <= a && d >= a);
|
|
|
|
}
|
|
|
|
|
|
|
|
printf("Silver: %d\nGold: %d\n", S, G);
|
|
|
|
}
|