mle求助
查看原帖
mle求助
1051743
kanqiqin楼主2024/8/5 13:46

数据:2 45 28 100 100 57 52 92 3 45 28

#include<bits/stdc++.h>
using namespace std;
int n,a,b,g,k,x,y,ts[10010][10010],t;
int main(){
	memset(ts,-1, sizeof(ts));
	cin>>n;
	while(n--){
		t++;
		cin>>a>>b>>g>>k;
		for(int j=a;j<=a+g;j++)  {
			for(int q=b;q<=b+k;q++) {
				ts[j][q]=t;
			}
		}
	}
	cin>>x>>y;
	cout<<ts[x][y]<<endl;
	return 0;
} 

mle求助

2024/8/5 13:46
加载中...