Submission #9252

#TimeUsernameProblemLanguageResultExecution timeMemory
9252jwvg0425N-orthotope (kriii2_N)C++98
0 / 4
0 ms1084 KiB
#include<stdio.h> int main(void) { int N, s[11], e[11], si, ei, M = 0; scanf("%d", &N); for (int i = 0; i < N; i++) { scanf("%d %d", &s[i], &e[i]); } for (int i = 0; i < N; i++) { scanf("%d %d", &si, &ei); if ((si<s[i] || si>e[i]) && (ei<s[i] || ei>e[i])) { return -1; } if ((si>s[i] && si<e[i]) || (ei>s[i] && ei < e[i])) { M++; } } printf("%d", M); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...