首页 > TAG信息列表 > 3669

POJ 3669 Meteor Shower

#include<iostream> #include<stdio.h> #include<queue> #include<utility> #include<memory.h> using namespace std; #define INF 1e9+7 typedef struct loca { int x, y, t; loca(int a, int b, int c){x=a,y=b,t=c;} }loca; int n, a

POJ - 3669

POJ - 3669 BFS 预处理 女主要从\((0,0)\) 开始逃到一个没有流星砸到的地方,这题只给了流星砸落的时间没有给整个地图 地图边界按最大值计算,女主到达某个地方的时间必须要小于流星砸落的时间就能继续走。 预处理流星砸落的时间即可 #include <iostream> #include <queue> #include

poi 3669 meteor shower (bfs)

  题目链接:http://poj.org/problem?id=3669 很基础的一道bfs的题,然而,我却mle了好多次,并且第二天才发现错在了哪里_(:з)∠)_ 写bfs或者dfs一定要记得对走过的地点进行记录,这题我本以为没必要记录了,结果就一直Memory Limit Exceeded   1 #include <cstdio> 2 #include <iostre