"Bzoj 3545" "Ontak 2010" Peaks & "Bzoj 3551" "Ontak 2010" Peaks Enhanced Kruskal refactoring tree

Source: Internet
Author: User

Sunshine's a question I actually tuned for a week!!!

Change the cyclic DFS to a DFS, and I don't know why it's not re, but it's a,,,

This week I've been working on this topic and summarizing the mental retardation errors:

1. The multiplication range is set to n instead of n*2-1,,,2. The vertex of the refactoring tree is n*2-1, and I set it up as the for4 of the For3 and i--of N,,,3.define in the beginning of the I++,,,,,,,,,,,,4.dfs explosion, Looking for the compiler to ask the CA to manually expand the stack, it is a stupid question,,,

There's never going to be too much time in the game, so it's going to be rough to make it Qaq

3545:

#include <cstdio> #include <cstring> #include <algorithm> #define FOR1 (i,a,n) for (int i= (a); i<= (n) ; i++) #define FOR2 (i,a,n) for (int i= (a);i< (n); i++) #define FOR3 (i,a,n) for (int i= (a); i>= (n); i--) #define FOR4 (I,a, n) for (int i= (a);i> (n), i--) #define CC (i,a) memset (i,a,sizeof (i)); #define READ (x) X=getint () using namespace std; inline const int Getint () {char c=getchar (); int k=1,r=0;for (;c< ' 0 ' | | C> ' 9 '; C=getchar ()) if (c== '-') k=-1;for (; c>= ' 0 ' &&c<= ' 9 '; C=getchar ()) r=r*10+c-' 0 '; return k*r;} inline const int MAX (const int &a,const int &b) {return a>b?a:b;} inline const int min (const int &a,const in T &b) {return a<b?a:b;} const int n=1e5+10; const int M=5*1E5+10; struct Node{int x, y, Z;} E[M]; struct Snnn{int l,r,s;} T[N*30]; int n,m,fa[n<<1],num[n<<1],hh[n],id[n],h[n],cnt,f[n<<1][20]; int root[n],l[n<<1],r[n<<1],lch[n<<1],rch[n<<1],st[n]; inline bool CMP (node X,node Y) {return x.z<y.z;} InliNE bool cmp2 (int x,int Y) {return hh[x]

3551:

#include <cstdio> #include <cstring> #include <algorithm> #define FOR1 (i,a,n) for (int i= (a); i<= (n) ; i++) #define FOR2 (i,a,n) for (int i= (a);i< (n); i++) #define FOR3 (i,a,n) for (int i= (a); i>= (n); i--) #define FOR4 (I,a, n) for (int i= (a);i> (n), i--) #define CC (i,a) memset (i,a,sizeof (i)); #define READ (x) X=getint () using namespace std; inline const int Getint () {char c=getchar (); int k=1,r=0;for (;c< ' 0 ' | | C> ' 9 '; C=getchar ()) if (c== '-') k=-1;for (; c>= ' 0 ' &&c<= ' 9 '; C=getchar ()) r=r*10+c-' 0 '; return k*r;} inline const int MAX (const int &a,const int &b) {return a>b?a:b;} inline const int min (const int &a,const in T &b) {return a<b?a:b;} const int n=1e5+10; const int M=5*1E5+10; struct Node{int x, y, Z;} E[M]; struct Snnn{int l,r,s;} T[N*30]; int n,m,fa[n<<1],num[n<<1],hh[n],id[n],h[n],cnt,f[n<<1][20]; int root[n],l[n<<1],r[n<<1],lch[n<<1],rch[n<<1],st[n]; inline bool CMP (node X,node Y) {return x.z<y.z;} InliNE bool cmp2 (int x,int Y) {return hh[x]

And then you can. O (∩_∩) o~~

"Bzoj 3545" "Ontak 2010" Peaks & "Bzoj 3551" "Ontak 2010" Peaks Enhanced Kruskal refactoring tree

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.