12 lines
291 B
C
12 lines
291 B
C
#include <stdio.h>
|
|
|
|
int main(void) {
|
|
int a, b, c, d, S = 0, G = 0;
|
|
|
|
while (scanf("%u-%u,%u-%u", &a, &b, &c, &d) == 4) {
|
|
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);
|
|
}
|