[NOIP2011]铺地毯

发布于 2017-08-18  84 次阅读


#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <queue>
using namespace std;
int n,g,k;
int qx,qy;
struct blanket{
	int a;
	int b;
	int x;
	int y;
	int no;
}e[10005];
int maxno=-1;
int main()
{
	scanf(
	for (int i=1;i<=n;++i)
	{
		scanf(
		scanf(
		e[i].x=e[i].a+g;
		e[i].y=e[i].b+k;
		e[i].no=i;
	}
	scanf(
	for (int i=1;i<=n;++i)
	{
		if (e[i].a<=qx && e[i].x>=qx && e[i].b<=qy && e[i].y>=qy)
		{
			maxno=max(maxno,e[i].no);
		}
	}
	printf(
	return 0;
}