今天题目还是比较简单的,不复杂。
#define MAX_TWO(a, b) ( (a > b) ? a : b )
#define MIN_TWO(a, b) ( (a < b) ? a : b )
bool isRectangleOverlap(int* rec1, int rec1Size, int* rec2, int rec2Size){
if( MIN_TWO(rec1[2],rec2[2]) > MAX_TWO(rec1[0],rec2[0]) && MIN_TWO(rec1[3],rec2[3]) > MAX_TWO(rec1[1],rec2[1]))
return true;
return false;
}