参考代码:
#include<bits/stdc.h>
#define INF 0x3f3f3f3f
using namespace std;
typedef long long ll;
ll cnt 0;
int a[100005], b[100005], c[100005];int main()
{ios::sync_with_stdio(false); int n;cin >> n;for(int i 0; i < n; i)cin…
参考代码:
#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…