10 2021 档案
摘要:类似于快读快写 1 inline __int128 read() 2 { 3 __int128 x=0,f=1; 4 char ch=getchar(); 5 while (ch<'0' || ch>'9') 6 { 7 if (ch=='-') f=-1; 8 ch=getchar(); 9 }
阅读全文
摘要:1 inline int read() //快读 2 { 3 int x=0,f=1; 4 char ch=getchar(); 5 while (ch<'0' || ch>'9') 6 { 7 if (ch=='-') f=-1; 8 ch=getchar(); 9 } 10 while (ch>
阅读全文
摘要:1 #include <iostream> 2 #include <cstdio> 3 using namespace std; 4 5 const int MAXN=50010; 6 int n,k; 7 int head[MAXN]; 8 int re[MAXN]; 9 10 int root(
阅读全文
摘要:1 #include <iostream> 2 #include <cstdio> 3 using namespace std; 4 5 const int MAXN=50010; 6 int n,k; 7 int head[MAXN*3]; //一倍存同类,一倍存吃,一倍存被吃 8 9 int r
阅读全文
摘要:1 #include <iostream> 2 3 using namespace std; 4 5 const int MAXN=10010; 6 7 int n,m; 8 int head[MAXN]; 9 10 int root(int x) //寻找根 11 { 12 if (head[x]
阅读全文