Submission #13549

#TimeUsernameProblemLanguageResultExecution timeMemory
13549baneling100N-orthotope (kriii2_N)C++98
4 / 4
0 ms1084 KiB
#include <stdio.h> #define N_MAX 11 int N, M, S1[N_MAX+1], E1[N_MAX+1], S2[N_MAX+1], E2[N_MAX+1]; int main(void) { int i; scanf("%d",&N); M=N; for(i=1 ; i<=N ; i++) scanf("%d %d",&S1[i],&E1[i]); for(i=1 ; i<=N ; i++) scanf("%d %d",&S2[i],&E2[i]); for(i=1 ; i<=N ; i++) { if(E1[i]<S2[i] || E2[i]<S1[i]) { printf("-1"); return 0; } if(E1[i]==S2[i] || E2[i]==S1[i]) M--; } printf("%d",M); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...