This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <cstdio>
int main() {
int n;
int a[11][2], b[11][2];
scanf("%d", &n);
for(int i=0; i<n; i++) {
scanf("%d %d", &a[i][0], &a[i][1]);
}
for(int i=0; i<n; i++) {
scanf("%d %d", &b[i][0], &b[i][1]);
}
int ans = n;
for(int i=0; i<n; i++) {
if(a[i][1] == b[i][0] || a[i][0] == b[i][1]) ans--;
else if(a[i][0] > b[i][1] || a[i][1] < b[i][0]) {
printf("0\n");
break;
}
}
printf("%d\n", ans);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |