原题地址:http://acm.hdu.edu.cn/showproblem.php?pid=6514
题意:给出q个矩形覆盖的区域,再给出若干个查询,判断每次查询的矩形是否已经被完全覆盖.
思路:二维差分处理一下,然后求二维前缀和,之后O(1)处理查询即可.
#include <bits/stdc++.h>
#define eps 1e-8
#define INF 0x3f3f3f3f
#define PI acos(-1)
#define lson l,mid,rt<<1
#define rson mid+1,r,(rt<<1)+1
#define CLR(x,y) memset((x),y,sizeof(x))
#define fuck(x) cerr << #x << "=" << x << endl
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int>VI;
const int seed = 131;
const int maxn = 1e5 + 5;
const int mod = 1e9 + 7;
int n, m, q;
vector<VI>V;
int x1, y1, x2, y2;
int main() {
while (~scanf("%d%d"