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<stdio.h>
int a[12], b[12], c[12], d[12];
int main(){
int n;
scanf("%d",&n);
int i;
for(i=0;i<n;i++)scanf("%d%d",a+i,b+i);
for(i=0;i<n;i++)scanf("%d%d",c+i,d+i);
int ans = 0;
for(i=0;i<n;i++){
if(a[i] < d[i] && c[i] < b[i])++ans;
else if(a[i] == d[i] || b[i] == c[i]);
else{ans = -1;break;}
}
printf("%d",ans);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |