参考代码:
#include<bits/stdc.h>
#define INF 0x3f3f3f3f
using namespace std;
typedef long long ll;
struct node{int x, y, step, ticket;node(int a, int b, ll c, int d){xa, yb, stepc, ticketd;}
};
queue<node> q;
bool vis[1005][1005];
i…
题目链接
先上AC代码。 参开代码:
#include<bits/stdc.h>
#include<unordered_map>
using namespace std;
#define INF 0x3f3f3f3f
typedef long long ll;string s[100005];
unordered_map<string, int> m;
bool check(string a, string b)
{if…