文章
6
粉丝
0
获赞
4
访问
811
Dijkstra+大数模拟
#include <bits/stdc++.h>
using namespace std;
struct Edge{
int u,v;
string w;
};
struct Node{
int u;
string d;
friend bool operator <(Node a, Node b){
if(a.d.size() == b.d.size()) return a.d > a.d;
return a.d.size() > b.d.size();
}
};
const int maxn = 105;
const int MOD = 100000;
int N,K;
vector<Edge> edges;
vector<int> G[maxn];
string dis[maxn];
int vis[maxn];
void addEdge(int u, int v, string w){
edges.push_back(Edge{u,v,w});
G[u].push_back(edges.size()-1);
}
string ADD(string a, string b){
string pre = "";
int lena = a.length(), lenb = b.length();
int prel = abs(lena - lenb);
for(int ...
登录后发布评论
1