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>
using namespace std;
int n, s[100], e[100];
int main() {
scanf("%d", &n);
for(int i = 0; i < n; i++) scanf("%d%d", s+i, e+i);
int res = n;
for(int i = 0; i < n; i++) {
int x, y; scanf("%d%d", &x, &y);
if(x == e[i] || y == s[i]) --res;
else if(x > e[i] && y < s[i]) res = -1;
}
printf("%d\n", res);
// your code goes here
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |