Submission #8362

#TimeUsernameProblemLanguageResultExecution timeMemory
8362cki86201N-orthotope (kriii2_N)C++98
4 / 4
0 ms1088 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...