HDU 5521 Meeting

Source: Internet
Author: User

Each point to his collection connected to a right 0 side, each set to him all points in a right to the side of C, run the shortest way on the line.

#include <bits/stdc++.h>using namespace std; #define PRT (k) cerr<< #k "=" <<k<<endltypedef long    Long Ll;//const int inf = 0x3f3f3f3f;const int M = 2000100;const LL inf = 0x3f3f3f3f3f3f3f3fll;struct edge{int v;    int W;    int NXT; Edge () {} edge (int vv, int ww, int Nxt =-1) {v = vv, w = ww, NXT = NXT;}} E[m << 2];int head[m], mm;void Initedge () {mm = 0; memset (head,-1, sizeof head);}    void Adde (int u, int v, int w) {swap (U, v);    E[MM] = Edge (V, W, Head[u]); Head[u] = mm + +;} Vector<int> g[m];int N, M;    ll d1[M], d2[m];struct heap{LL D; int u;    Heap () {} heap (LL dd, int uu) {d = dd, u = UU;}    BOOL operator < (const heap& RHS) Const {return d > rhs.d;    }};bool done[m];void dij (int src, LL d[]) {priority_queue

  

HDU 5521 Meeting

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.