题目大意:给出一个地图,如果经过两个不同的区块,需要花费1,否则不需要花费。问从st到ed最小需要花费多少。
思路:签到题。
CODE:
#include <queue>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#define MAX 510
#define MAXP 250010
#define MAXE 2000010
using namespace std;
const int dx[] = {0,1,-1,0,0};
const int dy[] = {0,0,0,1,-1};
struct Status{
int pos,len;
Status(int _,int __):pos(_),len(__) {}
bool operator <(const ......
阅读全文