Submission #8418

#TimeUsernameProblemLanguageResultExecution timeMemory
8418tncks0121N-orthotope (kriii2_N)C++98
0 / 4
0 ms1088 KiB
#include <cstdio> using namespace std; int n, s[100], e[100]; int main() { scanf("%d", &n); for(int i = 0; i < n; i++) scanf("%d%d", s+i, e+i); int res = n; for(int i = 0; i < n; i++) { int x, y; scanf("%d%d", &x, &y); if(x == e[i] || y == s[i]) --res; else if(x > e[i] && y < s[i]) res = -1; } printf("%d\n", res); // your code goes here return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...