#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 |
1 |
Incorrect |
0 ms |
1088 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |