摘要: 类似于快读快写 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 } 阅读全文
posted @ 2021-10-28 21:19 Hell0er 阅读(114) 评论(0) 推荐(0)
摘要: 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> 阅读全文
posted @ 2021-10-28 21:18 Hell0er 阅读(62) 评论(0) 推荐(0)
摘要: 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( 阅读全文
posted @ 2021-10-28 18:37 Hell0er 阅读(32) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2021-10-27 22:02 Hell0er 阅读(45) 评论(0) 推荐(0)