Submission #8381

#TimeUsernameProblemLanguageResultExecution timeMemory
8381aintaN-orthotope (kriii2_N)C++98
4 / 4
0 ms1088 KiB
#include<stdio.h> int n, w[12][4], i, C; int main() { scanf("%d", &n); for (i = 0; i < n; i++){ scanf("%d%d", &w[i][0], &w[i][1]); } for (i = 0; i < n; i++){ scanf("%d%d", &w[i][2], &w[i][3]); } for (i = 0; i < n; i++){ if (w[i][1] < w[i][2] || w[i][3] < w[i][0])break; if (w[i][1] != w[i][2] && w[i][3] != w[i][0]) C++; } if (i != n)printf("-1\n"); else printf("%d\n", C); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...