Pagini recente » Cod sursa (job #1796266) | Cod sursa (job #761650) | Cod sursa (job #562233) | Cod sursa (job #2901488) | Cod sursa (job #1351743)
#include <cstdio>
#include <algorithm>
#include <queue>
using namespace std;
struct alee
{
int x, y;
};
int mat[180][180];
queue<alee> q;
int n, m;
int dx[] = {0, 1, 0, -1};
int dy[]= {1, 0, -1, 0};
int main()
{
freopen("/Users/Cosmin/Documents/info/Alee 1/Alee 1/in","r",stdin);
freopen("/Users/Cosmin/Documents/info/Alee 1/Alee 1/out","w",stdout);
int x, y;
alee start, stop, aux;
scanf("%d%d", &n, &m);
for(int i = 1; i <= m; i++ )
{
scanf("%d%d", &x, &y);
mat[x][y] = -1;
}
for(int i = 0 ; i <= n+1; i ++)
{
mat[0][i] = -1;
mat[i][0] = -1;
mat[n + 1][i] = -1;
mat[i][n + 1] = -1;
}
scanf("%d%d%d%d", &start.x, &start.y, &stop.x, &stop.y);
q.push(start);
while(!q.empty())
{
aux = q.front();
for(int i = 1; i <= 4; i++)
{
}
}
return 0;
}