标号 搜 完了……
//By SiriusRen#include#include #include #include using namespace std;int n,t,xx[]={ 1,-1,0,0,0},yy[]={ 0,0,1,-1,0},map[666][666],vis[666][555];struct Node{ int x,y,t;}node[100050],jy;queue q;bool check(int x,int y){ return x>=0&&y>=0&&x<=600&&y<=600;}int main(){ memset(map,-1,sizeof(map)); scanf("%d",&n); for(int i=1;i<=n;i++){ scanf("%d%d%d",&node[i].x,&node[i].y,&node[i].t); for(int j=0;j<=4;j++){ int x=node[i].x,y=node[i].y; if(check(x+xx[j],y+yy[j])&&(map[x+xx[j]][y+yy[j]]==-1||(node[i].t