hdu 3376 Matrix Again
对时间复杂度要求还挺高的
#include<cstdio>
#include<algorithm>
#include<vector>
#include<cmath>
#include<set>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const int MAXN = 360000*2+10, inf = 0x3f3f3f3f;
int n, m;
struct _node
{
int to, next, cost, val;
_node(int a, int b, int c, int d): to(a),next(b),cost(c),val(d) {}
_node() {}
}ee[MAXN*10];
int head[MAXN], cnt, ppre[MAXN], wt[MAXN];
inline void add(......
阅读全文