社区讨论
求报错原因
灌水区参与者 4已保存回复 6
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 6 条
- 当前快照
- 1 份
- 快照标识符
- @lp17ve7x
- 此快照首次捕获于
- 2023/11/16 21:18 2 年前
- 此快照最后确认于
- 2023/11/17 06:50 2 年前
CPP
#include<bits/stdc++.h>
using namespace std;
long long m,n,x,y,x1[2010],y1[2010],x2[2010],y2[2010],cnt=0,boom=0,l;
int main(){
//freopen("轰炸II.in","r",stdin);
//freopen("轰炸II.out","w",stdout);
cin>>m>>n;
for(int i=0;i<m;i++)cin>>x1[i]>>y1[i]>>x2[i]>>y2[i];
for(int i=0;i<n;i++){
boom=0;
cnt=0;
cin>>x>>y;
for(int j=0;j<m;j++){
if(x1[j]>=x&&y1[j]>=y&&x2[j]<=x&&y2[j]<=y){
l=j;
cnt++;
boom=1;
}
}
if(boom)cout<<"YES "<<cnt<<" "<<l<<endl;
else cout<"NO"<<endl;
}
return 0;
}
回复
共 6 条回复,欢迎继续交流。
正在加载回复...