#include<bits/stdc++.h>
#define ui unsigned int
#define ll long long
#define db double
#define ld long double
#define ull unsigned long long
const int MAXN=1000+10;
int n,in[MAXN],out[MAXN],lt,ans,euler[MAXN],cnt,e,beg[MAXN],nex[MAXN*MAXN<<1],to[MAXN*MAXN<<1],vis[MAXN],app[MAXN];
template<typename T> inline void read(T &x)
{
T data=0,w=1;
char ch=0;
while(ch!='-'&&(ch<'0'||ch>'9'))ch=getchar();
if(ch=='-')w=-1,ch=getchar();
while(ch>='0'&&ch<='9')data=((T)data<<3)+((T)data<<1)+(ch^'0'),ch=getchar();
x=data*w;
}
template<typename T> inline void write(T x,char ch='\0')
{
if(x<0)putchar('-'),x=-x;
if(x>9)write(x/10);
putchar(x%10+'0');
if(ch!='\0')putchar(ch);
}
template<typen
12-15
269
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-24
339
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)