QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#407533#4406. 独立集问题Richard121119 34ms10560kbC++1441.2kb2024-05-08 22:25:532024-05-08 22:25:54

Judging History

你现在查看的是最新测评结果

  • [2024-05-08 22:25:54]
  • 评测
  • 测评结果:19
  • 用时:34ms
  • 内存:10560kb
  • [2024-05-08 22:25:53]
  • 提交

answer

/**************************************************
 * Fast Algorithm Template by Richard1211.
 * Please submit with C++14 or higher version.
 * Blog on Luogu: https://www.luogu.com.cn/blog/522539/
 * Blog on Byethost: http://Richard1211.byethost5.com/
 * Blog on RBTree's: https://Richard1211.rbtr.ee/
***************************************************/
//#pragma GCC optimize(3,"Ofast","inline")
//#pragma GCC target("avx2")
//open Ofast sometimes
#include <bits/stdc++.h>
#ifdef ONLINE_JUDGE
//#include <bits/extc++.h>
#else
//#include <ext/rope>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/hash_policy.hpp>
//#include <ext/pb_ds/trie_policy.hpp>
//#include <ext/pb_ds/priority_queue.hpp>
#endif
//#ifdef __linux__
//#include<sys/mman.h>
//#include<sys/types.h>
//#include<fcntl.h>
//#include<unistd.h>
//#else
//#endif
using namespace std;
//using namespace __gnu_cxx;
//using namespace __gnu_pbds;
#define YES io.write("YES\n")
#define Yes io.write("Yes\n")
#define yes io.write("yes\n")
#define NO io.write("NO\n")
#define No io.write("No\n")
#define no io.write("no\n")
#define Alice io.write("Alice\n")
#define Bob io.write("Bob\n")
#define PFir io.write("First\n")
#define Pfir io.write("first\n")
#define PSec io.write("Second\n")
#define Psec io.write("second\n")
#define RYES return YES,0
#define RYes return Yes,0
#define Ryes return yes,0
#define RNO return NO,0
#define RNo return No,0
#define Rno return no,0
#define RAlice return Alice,0
#define RBob return Bob,0
#define RFir return PFir,0
#define Rfir return Pfir,0
#define RSec return PSec,0
#define Rsec return Psec,0
#define sc(x) static_cast<long long>(x)
#define scu(x) static_cast<unsigned>(x)
#define scU(x) static_cast<unsigned long long>(x)
#define scd(x) static_cast<double>(x)
#define scD(x) static_cast<long double>(x)
#define scr(x) static_cast<char>(x)
#define Inline __inline__ __attribute__ ((always_inline))
#define Test() \
register int TestCount=MultiCase?read():1;\
for(register int TestCase=1;TestCase<=TestCount;++TestCase)
#define Tesf() for(register int TestCase=1;TestCase<=t;++TestCase)
#ifdef ONLINE_JUDGE
//when on OJ,close the debug version
//hope code with no bugs.
//think twice,code once.
//timer won't print anything
//don't be TLE or MLE,only AC.
#undef Debug
#undef Setmemory
#define Debug(...) 42
#define Setmemory(tmp) 0
#else
//open debug version.
//hope code with no bugs.
//because of using c++17, we need to undefine register.
//Debug will print out the things we need.
//Setmemory will set the end memory we need.
#define register
#define Debug(...) cerr << "Debug " << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#define Setmemory(Tmp) (Timebot::timer.End=&Tmp,0)
template<typename A,typename B>string to_string(pair<A,B>p);
template<typename A,typename B,typename C>string to_string(tuple<A,B,C>p);
template<typename A,typename B,typename C,typename D>string to_string(tuple<A,B,C,D>p);
string to_string(const string&s){return'"'+s+'"';}
string to_string(const char*s){return to_string((string)s);}
string to_string(bool b){return(b?"true":"false");}
string to_string(vector<bool>v){bool first=true;string res="{";for(int i=0;i<static_cast<int>(v.size());i++){if(!first){res+=", ";}first=false;res+=to_string(v[i]);}res+="}";return res;}
template<size_t N>string to_string(bitset<N>v){string res="";for(size_t i=0;i<N;i++){res+=static_cast<char>('0'+v[i]);}return res;}
template<typename A>string to_string(A v){bool first=true;string res="{";for(const auto&x:v){if(!first){res+=", ";}first=false;res+=to_string(x);}res+="}";return res;}
template<typename A,typename B>string to_string(pair<A,B>p){return"("+to_string(p.first)+", "+to_string(p.second)+")";}
template<typename A,typename B,typename C>string to_string(tuple<A,B,C>p){return"("+to_string(get<0>(p))+", "+to_string(get<1>(p))+", "+to_string(get<2>(p))+")";}
template<typename A,typename B,typename C,typename D>string to_string(tuple<A,B,C,D>p){return"("+to_string(get<0>(p))+", "+to_string(get<1>(p))+", "+to_string(get<2>(p))+", "+to_string(get<3>(p))+")";}
inline void debug_out(){cerr<<endl;}
template<typename Head,typename...Tail>void debug_out(Head H,Tail...T){cerr<<" "<<to_string(H);debug_out(T...);}
namespace Timebot{
	//timer will print the time and the memory of the code for you.
	//don't be TLE or MLE,only AC.
	struct Timer{
		bool f,*Beg,*End;
	    clock_t Begin;
	     Timer():Begin(clock()),Beg(&f){}
	    ~Timer(){double t=(clock()-Begin)*1000./CLOCKS_PER_SEC;t>=60000?fprintf(stderr,"Time: %.2lf min\n",t/60000.):t>=1000?fprintf(stderr,"Time: %.2lf s\n",t/1000.):fprintf(stderr,"Time: %.0lf ms\n",t);fprintf(stderr,"Memory: %.3lf MB\n",(End-Beg)/1048576.0);}
	}timer;
}
#endif
constexpr double pi=3.1415926535897932384626433832795;
constexpr double ei=2.7182818284590452353602874713527;
constexpr long long ZR=0;
constexpr long long OE=1;
template<class T>Inline T Min(register T a,register T b){return a<b?a:b;}
template<class T>Inline T Max(register T a,register T b){return a>b?a:b;}
template<class T>inline T Min(initializer_list<T>a){register T x=numeric_limits<T>::max();for(auto &it:a){x=Min(x,it);}return x;}
template<class T>inline T Max(initializer_list<T>a){register T x=numeric_limits<T>::min();for(auto &it:a){x=Max(x,it);}return x;}
template<class T>Inline bool Cmin(register T&a,register T b){return a>b?(a=b,true):false;}
template<class T>Inline bool Cmax(register T&a,register T b){return a<b?(a=b,true):false;}
template<class T>inline bool Cmin(register T&a,initializer_list<T>b){register long long x=a;for(auto &it:b){a=Min(a,it);}return x==a?false:true;}
template<class T>inline bool Cmax(register T&a,initializer_list<T>b){register long long x=a;for(auto &it:b){a=Max(a,it);}return x==a?false:true;}
template<class T>Inline T Abs(register T a){return a>0?a:-a;}
template<class T>Inline T Lowbit(register T x){return(x)&(-x);}
template<class T>Inline void Swap(register T&a,register T&b){return b^=a^=b^=a,void();}
template<class T>inline T Gcd(T a,T b){return b?Gcd(b,a%b):a;}
template<class T>inline T Lcm(T a,T b){return a*b/Gcd(a,b);}
template<class T>inline T Exgcd(T a,T b,T&x,T&y){if(b==0){x=1;y=0;return a;}T d=Exgcd(b,a%b,x,y);T t=x;x=y;y=t-a/b*y;return d;}
template<class T>inline T ExExgcd(T a,T b,T&x,T&y,T c){if(b==0){x=c;y=0;return a;}T d=ExExgcd(b,a%b,x,y,c);T t=x;x=y;y=t-a/b*y;return d;}
template<class T>inline T Ksc(T a,T b){if(a==0||b==0){return 0;}T ans=0;while(b){if(b&1){ans=a+ans;}a=a+a;b>>=1;}return ans;}
template<class T>inline T Ksc(T a,T b,T p){if(a==0||b==0){return 0;}T ans=0;while(b){if(b&1){ans=(a+ans)%p;}a=(a+a)%p;b>>=1;}return ans;}
template<class T>inline T Ksm(T a,T b,bool f=false){if(a==0){return 0;}if(b==0){return 1;}T ans=1;while(b){if(b&1){ans=!f?a*ans:Ksc(a,ans);}a=!f?a*a:Ksc(a,a);b>>=1;}return ans;}
template<class T>inline T Ksm(T a,T b,T p,bool f=false){if(a==0){return 0;}if(b==0){return 1%p;}T ans=1;while(b){if(b&1){ans=!f?a*ans%p:Ksc(a,ans,p);}a=!f?a*a%p:Ksc(a,a,p);b>>=1;}return ans;}
template<class T>inline T Inv(T x,T p){return Ksm(x,p-2,p);}
template<class T>inline T Fac(T n){if(n==0){return 1;}int ans=1;for(register int i=1;i<=n;++i){ans*=i;}return ans;}
template<class T>inline T Fac(T n,T p){if(n==0){return 1;}register long long ans=1;for(register int i=1;i<=n;++i){ans=ans*i%p;}return ans;}
template<class T>Inline int Popcount(T x,bool f=true){return f?__builtin_popcountll(x):__builtin_popcount(x);}
template<class T>Inline int Prebit(T x,bool f=true){return f?__builtin_clzll(x):__builtin_clz(x);}
template<class T>Inline int Sufbit(T x,bool f=true){return f?__builtin_ctzll(x):__builtin_ctz(x);}
template<class T>Inline int Lowone(T x,bool f=true){return f?__builtin_ffsll(x):__builtin_ffs(x);}
template<class T>Inline int Parity(T x,bool f=true){return f?__builtin_parityll(x):__builtin_parity(x);}
template<class T>Inline bool Isdigit(T ch){return ch>='0'&&ch<='9';}
template<class T>Inline bool Isletter(T ch){return ch>='A'&&ch<='Z'||ch>='a'&&ch<='z';}
template<class T>Inline bool Isupper(T ch){return ch>='A'&&ch<='Z';}
template<class T>Inline bool Islower(T ch){return ch>='a'&&ch<='z';}
template<class T>Inline char Tolower(T ch){return ch-'A'+'a';}
template<class T>Inline char Toupper(T ch){return ch-'a'+'A';}
template<class T>inline void Memset(T*d,long long n,long long s){for(register int i=0;i<=s-1;++i){d[i]=n;}}
template<class T>inline void Bug(T x,string name){cerr<<name<<": "<<x<<endl;}
template<class T>inline void Bug(T x){cerr<<x<<endl;}
template<class T>inline T Sin(register T degree){return sin(degree*(pi/180));}
template<class T>inline T Cos(register T degree){return cos(degree*(pi/180));}
template<class T>inline T Tan(register T degree){return tan(degree*(pi/180));}
template<class T>inline T Asin(register T degree){return asin(degree)*180.0/pi;}
template<class T>inline T Acos(register T degree){return acos(degree)*180.0/pi;}
template<class T>inline T Atan(register T degree){return atan(degree)*180.0/pi;}
template<class T>inline long long Rand(T l,T r){static mt19937_64 Rd(chrono::steady_clock::now().time_since_epoch().count());return uniform_int_distribution<long long>(l,r)(Rd);}
template<class T,class F>inline T Binarysearch(T l,T r,T f,const F &check){T mid,ans;for(mid=(l+r)>>1,ans=f;l<=r;mid=(l+r)>>1){check(mid)?ans=mid,r=mid-1:l=mid+1;}return ans;}
template<class T,class F>inline T Binarysearch(T l,T r,T f,double eps,const F &check){T mid,ans;for(mid=(l+r)/2;r-l>eps;mid=(l+r)/2){check(mid)?ans=mid,l=mid:r=mid;}return ans;}
template<class T>inline void Radixsort(register const int n,T*a,T*b){int r1[0x100],r2[0x100],r3[0x100],r4[0x100];memset(r1,0,sizeof(r1));memset(r2,0,sizeof(r2));memset(r3,0,sizeof(r3));memset(r4,0,sizeof(r4));register int i,tmp_int;register T*j,*tar;for(j=a+1,tar=a+n+1;j!=tar;++j){tmp_int=*(int*)j;++r1[tmp_int&0xff];++r2[(tmp_int>>8)&0xff];++r3[(tmp_int>>16)&0xff];++r4[tmp_int>>24];}for(i=1;i<=0xff;++i){r1[i]+=r1[i-1];r2[i]+=r2[i-1];r3[i]+=r3[i-1];r4[i]+=r4[i-1];}for(j=a+n;j!=a;--j){tmp_int=*(int*)j;b[r1[tmp_int&0xff]--]=*j;}for(j=b+n;j!=b;--j){tmp_int=*(int*)j;a[r2[(tmp_int>>8)&0xff]--]=*j;}for(j=a+n;j!=a;--j){tmp_int=*(int*)j;b[r3[(tmp_int>>16)&0xff]--]=*j;}for(j=b+n;j!=b;--j){tmp_int=*(int*)j;a[r4[tmp_int>>24]--]=*j;}}
template<class T>inline void Radixsort(register const int n,T*a,T*b,bool op){size_t size_of_type=sizeof(T);size_t num_of_buc=size_of_type>>1;unsigned**r=new unsigned*[num_of_buc];register int i,k;for(i=0;i<num_of_buc;++i){r[i]=new unsigned[0x10000];memset(r[i],0,0x10000*sizeof(unsigned));}register unsigned short tmp_us;register T*j,*tar;for(k=0;k<num_of_buc;++k){for(j=a+1,tar=a+n+1;j!=tar;++j){tmp_us=*(((unsigned short*)j)+k);++r[k][tmp_us];}}for(k=0;k<num_of_buc;++k){for(i=1;i<=0xffff;++i){r[k][i]+=r[k][i-1];}}for(k=0;k<num_of_buc;k+=0x2){i=k;for(j=a+n;j!=a;--j){tmp_us=*(((unsigned short*)j)+i);b[r[i][tmp_us]--]=*j;}i|=1;if(i==num_of_buc){break;}for(j=b+n;j!=b;--j){tmp_us=*(((unsigned short*)j)+i);a[r[i][tmp_us]--]=*j;}}for(int i=0;i<num_of_buc;i++){delete[]r[i];}delete[]r;}
template<class T>inline void Radixsort(register const int n,T*a,T*b,bool op1,bool op2){Radixsort(n,a,b,true);reverse(a+1,a+n+1);reverse(upper_bound(a+1,a+n+1,(T)(-0.0)),a+n+1);}
template<int R,int L=0,int M=(L+R>>1),class T>Inline void Unroll(int i,T f){R-L==1?f(L+i):(Unroll<M,L>(i,f),Unroll<R,M>(i,f));}
//inline int rd(){int x=0,f=1;char ch=getchar();while(ch<'0'||ch>'9'){if(ch=='-'){f=-1;}ch=getchar();}while(ch>='0'&&ch<='9'){x=(x<<1)+(x<<3)+(ch-'0');ch=getchar();}return x*f;}
//inline long long read(){long long x=0,f=1;char ch=getchar();while(ch<'0'||ch>'9'){if(ch=='-'){f=-1;}ch=getchar();}while(ch>='0'&&ch<='9'){x=(x<<1)+(x<<3)+(ch-'0');ch=getchar();}return x*f;}
//inline unsigned long long Read(){unsigned long long x=0;long long f=1;char ch=getchar();while(ch<'0'||ch>'9'){if(ch=='-'){f=-1;}ch=getchar();}while(ch>='0'&&ch<='9'){x=(x<<1)+(x<<3)+(ch-'0');ch=getchar();}return x*f;}
//inline bool wrt(int x,char ch='\n'){static char buf[64];static int len=-1;if(x<0){putchar('-');x=-x;}do{buf[++len]=x%10;x/=10;}while(x);while(len>=0){putchar(buf[len--]+'0');}putchar(ch);return true;}
//inline bool write(long long x,char ch='\n'){static char buf[64];static long long len=-1;if(x<0){putchar('-');x=-x;}do{buf[++len]=x%10;x/=10;}while(x);while(len>=0){putchar(buf[len--]+'0');}putchar(ch);return true;}
//inline bool Write(unsigned long long x,char ch='\n'){static char buf[64];static long long len=-1;if(x<0){putchar('-');x=-x;}do{buf[++len]=x%10;x/=10;}while(x);while(len>=0){putchar(buf[len--]+'0');}putchar(ch);return true;}
inline void OF(string s){string IN=s+".in";string OUT=s+".out";freopen(IN.c_str(),"r",stdin);freopen(OUT.c_str(),"w",stdout);}
inline void CF(string s){fclose(stdin);fclose(stdout);}
#define UseBuffer
struct IO{
#ifdef UseBuffer
	//unlockeds somtimes are a little faster than normals
	//#define fread fread_unlocked
	//#define fwrite fwrite_unlocked
    const static int BUFSIZE=1<<20;
	char buf[BUFSIZE],obuf[BUFSIZE],*p1,*p2,*pp;
	inline char getchar(){return(p1==p2&&(p2=(p1=buf)+fread(buf,1,BUFSIZE,stdin),p1==p2)?EOF:*p1++);}
	inline void putchar(char x){((pp-obuf==BUFSIZE&&(fwrite(obuf,1,BUFSIZE,stdout),pp=obuf)),*pp=x,pp++);}
	inline IO&flush(){fwrite(obuf,1,pp-obuf,stdout);fflush(stdout);return*this;}
	IO(){p1=buf,p2=buf,pp=obuf;}
	~IO(){flush();}
#else
	//remember to flush in interactive problems
    //int(*getchar)()=&::getchar_unlocked;
	//int(*putchar)(int)=&::putchar_unlocked;
	int(*getchar)()=&::getchar;
	int(*putchar)(int)=&::putchar;
	inline IO&flush(){fflush(stdout);return*this;};
#endif
	int k=2;
    string sep=" ";
	template<typename Tp,typename std::enable_if<std::is_integral<Tp>::value||std::is_same<Tp,__int128_t>::value>::type* =nullptr>inline int read(Tp&s){int f=1;char ch=getchar();s=0;while(!isdigit(ch)&&ch!=EOF)f=(ch=='-'?-1:1),ch=getchar();while(isdigit(ch))s=s*10+(ch^48),ch=getchar();s*=f;return ch!=EOF;}
	template<typename Tp,typename enable_if<is_floating_point<Tp>::value>::type* =nullptr>inline int read(Tp&s){int f=1;char ch=getchar();s=0;while(!isdigit(ch)&&ch!=EOF&&ch!='.')f=(ch=='-'?-1:1),ch=getchar();while(isdigit(ch))s=s*10+(ch^48),ch=getchar();if(ch==EOF)return false;if(ch=='.'){Tp eps=0.1;ch=getchar();while(isdigit(ch))s=s+(ch^48)*eps,ch=getchar(),eps/=10;}s*=f;return ch!=EOF;}
	inline int read(char&c){char ch=getchar();c=EOF;while(isspace(ch)&&ch!=EOF)ch=getchar();if(ch!=EOF)c=ch;return c!=EOF;}
	inline int read(char*c){char ch=getchar(),*s=c;while(isspace(ch)&&ch!=EOF)ch=getchar();while(!isspace(ch)&&ch!=EOF)*(c++)=ch,ch=getchar();*c='\0';return s!=c;}
	inline int read(string&s){s.clear();char ch=getchar();while(isspace(ch)&&ch!=EOF)ch=getchar();while(!isspace(ch)&&ch!=EOF)s+=ch,ch=getchar();return s.size()>0;}
	inline int getline(char*c,const char&ed='\n'){char ch=getchar(),*s=c;while(ch!=ed&&ch!=EOF)*(c++)=ch,ch=getchar();*c='\0';return s!=c;}
	inline int getline(string&s,const char&ed='\n'){s.clear();char ch=getchar();while(ch!=ed&&ch!=EOF)s+=ch,ch=getchar();return s.size()>0;}
	template<typename Tp=int>inline Tp read(){Tp x;read(x);return x;}
	template<typename Tp,typename...Ts>int read(Tp&x,Ts&...val){return read(x)&&read(val...);}
	template<typename Tp,typename enable_if<is_integral<Tp>::value>::type* =nullptr>IO&write(Tp x){if(x<0)putchar('-'),x=-x;static char sta[20];int top=0;do sta[top++]=x%10+'0',x/=10;while(x);while(top)putchar(sta[--top]);return*this;}
	inline IO&write(const string&str){for(char ch:str)putchar(ch);return*this;}
	inline IO&write(const char*str){while(*str!='\0')putchar(*(str++));return*this;}
	inline IO&write(char*str){return write((const char*)str);}
	inline IO&write(const char&ch){return putchar(ch),*this;}
	template<typename Tp,typename enable_if<is_floating_point<Tp>::value>::type* =nullptr>inline IO&write(Tp x){if(x>1e18||x<-1e18){write("[Floating point overflow]");throw;}if(x<0)putchar('-'),x=-x;const static long long pow10[]={1,10,100,1000,10000,100000,1000000,10000000,100000000,1000000000,10000000000,100000000000,1000000000000,10000000000000,100000000000000,1000000000000000,10000000000000000,100000000000000000,100000000000000000,100000000000000000};const auto&n=pow10[k];long long whole=(int)x;double tmp=(x-whole)*n;long long frac=tmp;double diff=tmp-frac;if(diff>0.5){++frac;if(frac>=n)frac=0,++whole;}else if(diff==0.5&&((frac==0U)||(frac&1U)))++frac;write(whole);if(k==0U){diff=x-(double)whole;if((!(diff<0.5)||(diff>0.5))&&(whole&1))++whole;}else{putchar('.');static char sta[20];int count=k,top=0;while(frac){sta[top++]=frac%10+'0';frac/=10,count--;}while(count--)putchar('0');while(top)putchar(sta[--top]);}return*this;}
	template<typename Tp,typename...Ts>inline IO&write(Tp x,Ts...val){write(x);write(sep);write(val...);return*this;}
	template<typename...Ts>inline IO&writeln(Ts...val){write(val...);putchar('\n');return*this;}
	inline IO&writeln(void){putchar('\n');return*this;}
	template<typename Tp>inline IO&writeWith(Tp x,const string&s=" "){write(x),write(s);return*this;}
	inline IO&setsep(const string&s){return sep=s,*this;}
	inline IO&setprec(const int&K){return k=K,*this;}
}io;
//namespace mmapreader{
// 	 inline namespace __private__{int len=0,file=-1;char*addr,*nowp,*buff;}
// 	 inline void prepareread(string filename){file=open(filename.c_str(),O_RDONLY);len=(int)lseek(file,0,SEEK_END);addr=(char*)(mmap(0,len,PROT_READ,MAP_PRIVATE,file,0));close(file);buff=(char*)malloc(len*sizeof(char));memcpy(buff,addr,len);munmap(addr,len);nowp=buff;atexit([&buff](){free(buff);});}
// 	 inline void prepareread(FILE* fileptr){file=fileno(fileptr);len=(int)lseek(file,0,SEEK_END);addr=(char*)(mmap(0,len,PROT_READ,MAP_PRIVATE,file,0));buff=(char*)malloc(len*sizeof(char));memcpy(buff,addr,len);munmap(addr,len);nowp=buff;atexit([&buff](){free(buff);});}
// 	 template<typename T>T checked_read(){if(nowp-buff>=len)throw overflow_error("Read out of range!");static T n,s;n=0,s=1;while((*nowp>'9'||*nowp<'0')&&(nowp-buff<len)){if(*nowp=='-')s=-s;nowp++;}if(nowp-buff>=len)throw overflow_error("Read out of range!");while((*nowp<='9'&&*nowp>='0')&&(nowp-buff<len)){n=10*n+(*nowp-'0');nowp++;}return n*s;}
// 	 template<typename T>T unchecked_read(){static T n,s;n=0,s=1;while(*nowp>'9'||*nowp<'0'){if(*nowp=='-')s=-s;nowp++;}while(*nowp<='9'&&*nowp>='0'){n=10*n+(*nowp-'0');nowp++;}return n*s;}template<> string checked_read<string>(){if(nowp-buff>=len)throw overflow_error("Read out of range!");static string s;s="";while((*nowp==' '||*nowp==0||*nowp==-1||*nowp=='\n'||*nowp=='\t'||*nowp=='\r')&&(nowp-buff<len))nowp++;if(nowp-buff>=len)throw overflow_error("Read out of range!");while(!(*nowp==' '||*nowp==0||*nowp==-1||*nowp=='\n'||*nowp=='\t'||*nowp=='\r')&&(nowp-buff<len))s+=*(nowp++);return s;}
// 	 template<> string unchecked_read<string>(){static string s;s="";while((*nowp==' '||*nowp==0||*nowp==-1||*nowp=='\n'||*nowp=='\t'||*nowp=='\r'))nowp++;while(!(*nowp==' '||*nowp==0||*nowp==-1||*nowp=='\n'||*nowp=='\t'||*nowp=='\r'))s+=*(nowp++);return s;}
// 	 template<> char checked_read<char>(){if(nowp-buff>=len)throw overflow_error("Read out of range!");while((*nowp==' '||*nowp==0||*nowp==-1||*nowp=='\n'||*nowp=='\t'||*nowp=='\r')&&(nowp-buff<len))nowp++;if(nowp-buff>=len)throw overflow_error("Read out of range!");return *(nowp++);}
// 	 template<> char unchecked_read<char>(){while((*nowp==' '||*nowp==0||*nowp==-1||*nowp=='\n'||*nowp=='\t'||*nowp=='\r'))nowp++;return *(nowp++);}
// 	 template<>long double checked_read<long double>(){if(nowp-buff>=len)throw overflow_error("Read out of range!");static long double x,s,n,p;static char*oc;oc=nowp,x=0,s=1,n=0,p=1;while((*nowp>'9'||*nowp<'0')&&(nowp-buff<len)){if(*nowp=='-')s=-s;nowp++;}if(nowp-buff>=len)throw overflow_error("Read out of range!");while((*nowp<='9'&&*nowp>='0')&&(nowp-buff<len)){n=10*n+(*nowp-'0');nowp++;}if(nowp-buff>=len||(*nowp!='.'&&*nowp!='e'&&*nowp!='E'))return n*s;if(*nowp=='E'||*nowp=='e'){nowp++;while(*nowp=='-')p=-p,nowp++;if(nowp-buff>=len)return nowp=oc,n*s;while((*nowp<='9'&&*nowp>='0')&&(nowp-buff<len))x=10*x+(*nowp-'0'),nowp++;return n*powl(10.0l,x*p);}nowp++;while((*nowp<='9'&&*nowp>='0')&&(nowp-buff<len))x=10*x+(*nowp-'0'),nowp++;return n+x/powl(10.0l,floorl(log10l(x)+1));}
// 	 template<>long double unchecked_read<long double>(){static long double x,s,n,p;static char*oc;oc=nowp,x=0,s=1,n=0,p=1;while(*nowp>'9'||*nowp<'0'){if(*nowp=='-')s=-s;nowp++;}while((*nowp<='9'&&*nowp>='0')){n=10*n+(*nowp-'0');nowp++;}if(nowp-buff>=len||(*nowp!='.'&&*nowp!='e'&&*nowp!='E'))return n*s;if(*nowp=='E'||*nowp=='e'){nowp++;while(*nowp=='-')p=-p,nowp++;while(*nowp<='9'&&*nowp>='0')x=10*x+(*nowp-'0'),nowp++;return n*powl(10.0l,x*p);}nowp++;while(*nowp<='9'&&*nowp>='0')x=10*x+(*nowp-'0'),nowp++;return n+x/powl(10.0l,floorl(log10l(x)+1));}
// 	 template<>float checked_read<float>(){return checked_read<long double>();}template<>float unchecked_read<float>(){return unchecked_read<long double>();}
// 	 template<>double checked_read<double>(){return checked_read<long double>();}
// 	 template<>double unchecked_read<double>(){return checked_read<long double>();}
// 	 template<typename T>T checked_read(T& val){return val=checked_read<T>();}
// 	 template<typename T>T unchecked_read(T& val){return val=unchecked_read<T>();}
// 	 template<typename T,typename... args>T checked_read(T& val,args&... ar){return val=checked_read<T>(),checked_read(ar...);}
// 	 template<typename T,typename... args>T unchecked_read(T& val,args&... ar){return val=unchecked_read<T>(),unchecked_read(ar...);}
//}
//namespace mmapwriter{
// 	 int maxsize=5000000,floatpos=11;
// 	 bool truncate=true;
// 	 inline namespace __private__{int len=0,file=-1;char*addr,*nowp,*buff;}
// 	 inline void preparewrite(string filename){buff=(char*)malloc(maxsize*sizeof(char));nowp=buff;file=open(filename.c_str(),O_RDWR|O_CREAT,00777);atexit([&len,&file,&addr,&buff](){/*write(file,buff,len);*/lseek(file,len-1,SEEK_END);write(file,"",1);addr=(char*)mmap(0,len,PROT_READ|PROT_WRITE,MAP_SHARED,file,0);close(file);memcpy(addr,buff,len);munmap(addr,len);});}inline void prepare(FILE* fileptr){buff=(char*)malloc(maxsize*sizeof(char));nowp=buff;file=fileno(fileptr);atexit([&len,&file,&addr,&buff](){write(file,buff,len);});}
// 	 template<typename T>bool write(T val){if(val<0)write('-'),val=-val;if(val>9)write<T>(val/10);*nowp='0'+val%10,nowp++,len++;return true;}
// 	 template<> bool write<char>(char val){*nowp=val,nowp++,len++;return true;}
// 	 template<> bool write<const char*>(const char*val){for(int i=0;i<strlen(val);i++)*nowp=val[i],nowp++,len++;return true;}
// 	 template<> bool write<char*>(char*val){for(int i=0;i<strlen(val);i++)*nowp=val[i],nowp++,len++;return true;}
// 	 template<> bool write<string>(string val){for(int i=0;i<val.size();i++)*nowp=val[i],nowp++,len++;return true;}
// 	 template<>bool write<long double>(long double x){static int k=1;if(k==1)return k=0,write(x/10.0l),*(nowp++)=floorl(fmodl(x,10.0l))+'0',len++,(~floatpos||x-floorl(x)>1e-20l?len++,*(nowp++)='.',k--,write((floorl(x)-x)):1),k=1;if(truncate&&k==-1&&fabs(x)<=1e-20l)return len-=2;if(truncate&&k<1&&fabs(x)<=1e-20l)return len--;if(-k>floatpos)return true;if(fabs(x)<=1e-20l)return*(nowp++)='0';if(x<=-1.0l)return*(nowp++)='-',len++,write(-x);if(x<0.0l)return*(nowp++)=-x*10.0l+'0',len++,k--,write(fmodl(x,0.1l)*10.0l);if(x<10.0l)return*(nowp++)=x+'0',len++;return write(x/10.0l),*(nowp++)=floorl(fmodl(x,10.0l))+'0',len++;}
// 	 template<>bool write<float>(float x){return write<long double>(x);}
// 	 template<>bool write<double>(double x){return write<long double>(x);}
// 	 template<typename T>bool writeln(T val){return write(val),write('\n');}
// 	 template<typename T,typename... args>bool write(T val,args... ar){return write(val),write(' '),write(ar...);}
// 	 template<typename T,typename... args>bool writeln(T val,args... ar){return writeln(val),writeln(ar...);}
//}
//#ifdef __linux__
//#define read unchecked_read
//using namespace mmapreader;
//using namespace mmapwriter;
//inline int rd(){return unchecked_read<int>();}
//inline long long read(){return unchecked_read<long long>();}
//inline unsigned long long Read(){return unchecked_read<unsigned long long>();}
//inline bool wrt(int x,char ch='\n'){return write<int>(x),write<char>(ch),true;}
//inline bool write(long long x,char ch='\n'){return write<long long>(x),write<char>(ch),true;}
//inline bool Write(unsigned long long x,char ch='\n'){return write<unsigned long long>(x),write<char>(ch),true;}
//#else
inline int rd(){return io.read<int>();}
inline long long read(){return io.read<long long>();}
inline unsigned long long Read(){return io.read<unsigned long long>();}
inline bool wrt(int x,string ch="\n"){return io.writeWith(x,ch),true;}
inline bool write(long long x,string ch="\n"){return io.writeWith(x,ch),true;}
inline bool Write(unsigned long long x,string ch="\n"){return io.writeWith(x,ch),true;}
//#endif
#if __cplusplus>=201402L
namespace Montgomery{
#define Modulus_Const
#define Modulus_Prime
//if modulus is const,open Montgomery Fast  Version.
//if modulus is not const,open Dynamic Fast Version,if modulus is not prime,open Dynamic Modulus Version.
#ifdef Modulus_Prime
	bool PR=true;
#else
	bool PR=false;
#endif
	namespace Mont32{
		inline constexpr unsigned getroot1(int MOD){unsigned iv=MOD;for(register unsigned i=0;i!=4;++i){iv*=2U-MOD*iv;}return-iv;}
		template<int MOD>struct Mont{
			private:
				unsigned v;static constexpr unsigned r1=getroot1(MOD),r2=-(unsigned long long)(MOD)%MOD;static_assert((MOD&1)==1);static_assert(-r1*MOD==1);static_assert(MOD<(1<<30));
				inline static constexpr unsigned ksmmod(unsigned x,unsigned long long y){unsigned ans=1;for(;y!=0;y>>=1,x=(unsigned long long)(x)*x%MOD){if(y&1){ans=(unsigned long long)(ans)*x%MOD;}}return ans;}
				inline static constexpr unsigned reduce(unsigned long long x){return x+(unsigned long long)(unsigned(x)*r1)*MOD>>32;}
				inline static constexpr unsigned norm(unsigned x){return x-(MOD&-(x>=MOD));}
			public:
				static constexpr unsigned primitive(){unsigned tmp[32]={},cnt=0;constexpr unsigned long long phi=MOD-1;unsigned long long m=phi;for(register unsigned long long i=2;i*i<=m;++i){if(m%i==0){tmp[cnt++]=i;while(m%i==0){m/=i;}}}if(m!=1){tmp[cnt++]=m;}for(register unsigned long long ans=2;ans!=MOD;++ans){bool flag=true;for(register unsigned i=0;i!=cnt&&flag;++i){flag&=ksmmod(ans,phi/tmp[i])!=1;}if(flag){return ans;}}return 0;}
				 Mont()=default;
				~Mont()=default;
				constexpr Mont(unsigned v):v(reduce((unsigned long long)(v)*r2)){}
				constexpr Mont(const Mont&x):v(x.v){}
				inline int getP()const{return MOD;}
				constexpr unsigned get()const{return norm(reduce(v));}
				explicit constexpr operator unsigned()const{return get();}
				explicit constexpr operator int()const{return(int)(get());}
				Mont operator-()const{Mont ans;return ans.v=(MOD<<1&-(v!=0))-v,ans;}
				Mont Inv()const{int x1=1,x3=0,a=get(),b=MOD;while(b!=0){int q=a/b;tie(x1,x3)=make_tuple(x3,x1-x3*q);tie(a,b)=make_tuple(b,a-b*q);}return Mont(x1+MOD);}
				Mont&operator+=(const Mont&x){return v+=x.v-(MOD<<1),v+=MOD<<1&-(v>>31),*this;}
				Mont&operator-=(const Mont&x){return v-=x.v,v+=MOD<<1&-(v>>31),*this;}
				Mont&operator*=(const Mont&x){return v=reduce((unsigned long long)(v)*x.v),*this;}
				Mont&operator/=(const Mont&x){return this->operator*=(x.Inv());}
				#define stO(op) friend Mont operator op(const Mont&x,const Mont&y){return Mont(x)op##=y;}
				stO(+)stO(-)stO(*)stO(/)
				#undef stO
				#define stO(op) friend bool operator op(const Mont&x,const Mont&y){return norm(x.v)op norm(y.v);}
				stO(==)stO(!=)stO(>)stO(<)stO(>=)stO(<=)
				#undef stO
				Mont&operator++(){*this+=1;return*this;}
				Mont&operator--(){*this-=1;return*this;}
				Mont operator++(int){Mont ans(*this);*this+=1;return ans;}
				Mont operator--(int){Mont ans(*this);*this-=1;return ans;}
				Mont Ksm(long long b){Mont ans=1,a=get();while(b){if(b&1){ans=ans*a;}a=a*a;b>>=1;}return ans;}
				friend istream&operator>>(istream&is,Mont&x){return is>>x.v,x.v=reduce((unsigned long long)(x.v)*r2),is;}
				friend ostream&operator<<(ostream&os,Mont&x){return os<<x.get();}
		};
	}
	namespace Mont64{
		inline constexpr unsigned long long getroot1(long long MOD){unsigned long long iv=MOD;for(register unsigned i=0;i!=5;++i){iv*=2ULL-MOD*iv;}return iv;}
		inline constexpr unsigned long long getroot2(long long MOD){unsigned long long iv=-(unsigned long long)(MOD)%MOD;for(register unsigned i=0;i!=64;++i){if(MOD<=(iv<<=1)){iv-=MOD;}}return iv;}
		template<long long MOD>struct Mont{
			private:
				unsigned long long v;
				static constexpr unsigned long long r1=getroot1(MOD);static constexpr unsigned long long r2=getroot2(MOD);static_assert((MOD&1)==1);static_assert(r1*MOD==1);static_assert(MOD<(1ULL<<63));
				inline static pair<unsigned long long,unsigned long long>mul(unsigned long long x,unsigned long long y){unsigned long long a=x>>32,b=(unsigned)(x),c=y>>32,d=(unsigned)(y),ac=a*c,bd=b*d,ad=a*d,bc=b*c;return make_pair(ac+(ad>>32)+(bc>>32)+((ad&-1U)+(bc&-1U)+(bd>>32)>>32),bd+(ad+bc<<32));}
				inline static unsigned long long mulhi(unsigned long long x,unsigned long long y){unsigned long long a=x>>32,b=(unsigned)(x),c=y>>32,d=(unsigned)(y),ac=a*c,bd=b*d,ad=a*d,bc=b*c;return ac+(ad>>32)+(bc>>32)+((ad&-1U)+(bc&-1U)+(bd>>32)>>32);}
				inline static unsigned long long reduce(const pair<unsigned long long,unsigned long long>&x){unsigned long long ans=x.first-mulhi(x.second*r1,MOD);return ans+(MOD&-(ans>>63));}
				inline static unsigned long long ksmmod(unsigned long long x,unsigned long long y){unsigned long long ans=reduce(make_pair(0,r2));for(x=reduce(mul(x,r2));y!=0;y>>=1,x=reduce(mul(x,x))){if(y&1){ans=reduce(mul(ans,x));}}return reduce(make_pair(0,ans));}
			public:
				inline static unsigned long long primitive(){unsigned long long tmp[128]={},cnt=0;constexpr unsigned long long phi=MOD-1;unsigned long long m=phi;for(register unsigned long long i=2;i*i<=m;++i){if(m%i==0){tmp[cnt++]=i;while(m%i==0){m/=i;}}}if(m!=1){tmp[cnt++]=m;}for(register unsigned long long ans=2;ans!=MOD;++ans){bool flag=true;for(register unsigned i=0;i!=cnt&&flag;++i){flag&=ksmmod(ans,phi/tmp[i])!=1;}if(flag){return ans;}}return 0;}
				 Mont()=default;
				~Mont()=default;
				Mont(unsigned long long v):v(reduce(mul(v,r2))){}
				Mont(const Mont&x):v(x.v){}
				inline long long getP()const{return MOD;}
				inline unsigned long long get()const{return reduce(make_pair(0,v));}
				explicit operator long long()const{return(long long)(get());}
				explicit operator unsigned long long()const{return get();}
				Mont Inv()const{long long x1=1,x3=0,a=get(),b=MOD;while(b!=0){long long q=a/b;tie(x1,x3)=make_tuple(x3,x1-x3*q);tie(a,b)=make_tuple(b,a-b*q);}return Mont(x1+MOD);}
				Mont operator-()const{Mont ans;return ans.v=(MOD&-(v!=0))-v,ans;}
				Mont&operator*=(const Mont&x){return v=reduce(mul(v,x.v)),*this;}
				Mont&operator+=(const Mont&x){return v+=x.v-MOD,v+=MOD&-(v>>63),*this;}
				Mont&operator-=(const Mont&x){return v-=x.v,v+=MOD&-(v>>63),*this;}
				Mont&operator/=(const Mont&x){return this->operator*=(x.Inv());}
				#define stO(op) friend Mont operator op(const Mont&x,const Mont&y){return Mont(x)op##=y;}
				stO(+)stO(-)stO(*)stO(/)
				#undef stO
				#define stO(op) friend bool operator op(const Mont&x,const Mont&y){return reduce(make_pair(0,x.v))op reduce(make_pair(0,y.v));}
				stO(==)stO(!=)stO(>)stO(<)stO(>=)stO(<=)
				#undef stO
				Mont&operator++(){*this+=1;return*this;}
				Mont&operator--(){*this-=1;return*this;}
				Mont operator++(int){Mont ans(*this);*this+=1;return ans;}
				Mont operator--(int){Mont ans(*this);*this-=1;return ans;}
				friend istream&operator>>(istream&is,Mont&x){return is>>x.v,x.v=reduce(mul(x.v,r2)),is;}
				friend ostream&operator<<(ostream&os,Mont&x){return os<<x.get();}
				Mont Ksm(long long b){Mont ans=1,a=get();while(b){if(b&1){ans=ans*a;}a=a*a;b>>=1;}return ans;}
		};
	}
	namespace DynamicMont{
		using Tp=long long;
		struct Barrett{
			bool f;long long coef,p;
			inline void Setp(long long P){coef=((__int128)1<<64)/(p=P);}
			long long operator() (const long long &x){return PR?x-(((__int128)x*coef)>>64)*p:(x>=2*p?x%p:x>=p&&x<2*p?x-p:x>=0&&x<p?x:x<0&&x>-p?x+p:x%p+p);}
		}Rec;
		template<int DM>struct Mont{
			static Tp MOD;Tp v;
			 Mont()=default;
			~Mont()=default;
			static void Setp(Tp p){MOD=p;Rec.Setp(MOD);}
			inline Tp getP(){return MOD;}
			inline Tp get(){Mont ans=*this;return ans.v;}
			template<class T>inline Tp reduce(const T &x){Tp ans=Rec(x);return ans<0?ans+MOD:ans;}
			template<class T>Mont(const T&x):v(reduce(x)){}
			Mont operator-()const{return Mont(v?MOD-v:0);}
			Mont&operator+=(const Mont&x){return v=reduce(v+x.v),*this;}
			Mont&operator-=(const Mont&x){return v=reduce(v-x.v),*this;}
			Mont&operator*=(const Mont&x){return v=reduce(v*x.v),*this;}
			Mont&operator/=(const Mont&x){return*this*=x.Inv();}
			#define stO(op) friend Mont operator op(const Mont&x,const Mont&y){return Mont(x)op##=y;}
			stO(+)stO(-)stO(*)stO(/)
			#undef stO
			#define stO(op) friend bool operator op(const Mont&x,const Mont&y){return x.v op y.v;}
			stO(==)stO(!=)stO(>)stO(<)stO(>=)stO(<=)
			#undef stO
			Mont&operator++(){*this+=1;return*this;}
			Mont&operator--(){*this-=1;return*this;}
			Mont operator++(int){Mont ans(*this);*this+=1;return ans;}
			Mont operator--(int){Mont ans(*this);*this-=1;return ans;}
			Mont Ksm(long long b)const{Mont ans=1,a=*this;while(b){if(b&1){ans=ans*a;}a=a*a;b>>=1;}return ans;}
			Mont Inv()const{return Ksm(MOD-2);}
		};
		template<int DM>Tp Mont<DM>::MOD;
	}
#if (defined Modulus_Const)&&(defined Modulus_Prime)
	using namespace Mont64;
	constexpr long long MOD=998244353;
	using Z=Mont<MOD>;
	inline long long Get(long long x){return x>=0?x:x<-MOD?x%MOD+MOD:x+MOD;}
	//use this often,it's safe.
#else
	using namespace DynamicMont;
	using Z=Mont<-1 >;
#endif
	namespace Mathematics{
		struct Combination{
			int n;long long P;vector<Z>inv,fac,ifac;
			Combination(int lim,long long M):n(lim){P=M;inv=vector<Z>(lim+3);fac=vector<Z>(lim+3);ifac=vector<Z>(lim+3);Init();}
			inline void Init(){fac[0]=ifac[0]=1;inv[1]=fac[1]=ifac[1]=1;for(register int i=2;i<=n;++i){inv[i]=(Z)P-(Z)(P/i)*inv[P%i];fac[i]=fac[i-1]*i;ifac[i]=ifac[i-1]*inv[i];}return void();}
			inline Z Inv(long long x){return inv[x];}
			inline Z Fac(long long x){return fac[x];}
			inline Z Ifac(long long x){return ifac[x];}
			inline Z A(long long x,long long y){return x<y||x<0||y<0?0:fac[x]*ifac[y];}
			inline Z C(long long x,long long y){return x<y||x<0||y<0?0:fac[x]*ifac[y]*ifac[x-y];}
		};
	}
	using namespace Mathematics;
}
#else
namespace Montgomery{
#define Modulus_Const
#define Modulus_Prime
//if modulus is const,open Montgomery Fast  Version.
//if modulus is not const,open Dynamic Fast Version,if modulus is not prime,open Dynamic Modulus Version.
#ifdef Modulus_Prime
	bool PR=true;
#else
	bool PR=false;
#endif
    namespace DynamicMont{
		using Tp=long long;
		struct Barrett{
			bool f;long long coef,p;
			inline void Setp(long long P){coef=((__int128)1<<64)/(p=P);}
			long long operator() (const long long &x){return PR?x-(((__int128)x*coef)>>64)*p:(x>=2*p?x%p:x>=p&&x<2*p?x-p:x>=0&&x<p?x:x<0&&x>-p?x+p:x%p+p);}
		}Rec;
		template<int DM>struct Mont{
			static Tp MOD;Tp v;
			 Mont()=default;
			~Mont()=default;
			static void Setp(Tp p){MOD=p;Rec.Setp(MOD);}
			inline Tp getP(){return MOD;}
			inline Tp get(){Mont ans=*this;return ans.v;}
			template<class T>inline Tp reduce(const T &x){Tp ans=Rec(x);return ans<0?ans+MOD:ans;}
			template<class T>Mont(const T&x):v(reduce(x)){}
			Mont operator-()const{return Mont(v?MOD-v:0);}
			Mont&operator+=(const Mont&x){return v=reduce(v+x.v),*this;}
			Mont&operator-=(const Mont&x){return v=reduce(v-x.v),*this;}
			Mont&operator*=(const Mont&x){return v=reduce(v*x.v),*this;}
			Mont&operator/=(const Mont&x){return*this*=x.Inv();}
			#define stO(op) friend Mont operator op(const Mont&x,const Mont&y){return Mont(x)op##=y;}
			stO(+)stO(-)stO(*)stO(/)
			#undef stO
			#define stO(op) friend bool operator op(const Mont&x,const Mont&y){return x.v op y.v;}
			stO(==)stO(!=)stO(>)stO(<)stO(>=)stO(<=)
			#undef stO
			Mont&operator++(){*this+=1;return*this;}
			Mont&operator--(){*this-=1;return*this;}
			Mont operator++(int){Mont ans(*this);*this+=1;return ans;}
			Mont operator--(int){Mont ans(*this);*this-=1;return ans;}
			Mont Ksm(long long b)const{Mont ans=1,a=*this;while(b){if(b&1){ans=ans*a;}a=a*a;b>>=1;}return ans;}
			Mont Inv()const{return Ksm(MOD-2);}
		};
		template<int DM>Tp Mont<DM>::MOD;
	}
    using namespace DynamicMont;
#if (defined Modulus_Const)&&(defined Modulus_Prime)
	constexpr long long MOD=998244353;
	using Z=Mont<-1>;
    struct SetMod{SetMod(){Z::Setp(MOD);}}SetMOD;
#else
	using Z=Mont<-1>;
#endif
	namespace Mathematics{
		struct Combination{
			int n;long long P;vector<Z>inv,fac,ifac;
			Combination(int lim,long long M):n(lim){P=M;inv=vector<Z>(lim+3);fac=vector<Z>(lim+3);ifac=vector<Z>(lim+3);Init();}
			inline void Init(){fac[0]=ifac[0]=1;inv[1]=fac[1]=ifac[1]=1;for(register int i=2;i<=n;++i){inv[i]=(Z)P-(Z)(P/i)*inv[P%i];fac[i]=fac[i-1]*i;ifac[i]=ifac[i-1]*inv[i];}return void();}
			inline Z Inv(long long x){return inv[x];}
			inline Z Fac(long long x){return fac[x];}
			inline Z Ifac(long long x){return ifac[x];}
			inline Z A(long long x,long long y){return x<y||x<0||y<0?0:fac[x]*ifac[y];}
			inline Z C(long long x,long long y){return x<y||x<0||y<0?0:fac[x]*ifac[y]*ifac[x-y];}
		};
	}
	using namespace Mathematics;
}
#endif
using namespace Montgomery;
/*
Good Luck!
Have Fun!
CSPJ RP++
CSPS RP++
  OI RP++
 NOI RP++
 CTT RP++
 CTS RP++
 IOI RP++
Goal:
CF GM
AT 2DAN
LG Lv9

To be continued...
*/
//.................................................................................................................
//.................................................................................................................
//.................................................................................................................
//.................................................................................................................
//.................................................................................................................
//.......RRRRRRRRRRRRRRRRRRRR...................PPPPPPPPPPPPPPPPPPPP...............................................
//.......RRRRRRRRRRRRRRRRRRRRRR.................PPPPPPPPPPPPPPPPPPPPPP.............................................
//.......RRRRRRRRRRRRRRRRRRRRRRR................PPPPPPPPPPPPPPPPPPPPPPPP...........................................
//.......RRRR.................RRRRR.............PPPP...............PPPPP...........................................
//.......RRRR.................RRRRR.............PPPP................PPPPP..........................................
//.......RRRR.................RRRRR.............PPPP................PPPPP..........................................
//.......RRRR...............RRRRR...............PPPP...............PPPPP...........................................
//.......RRRR............RRRRRR.................PPPP.............PPPPPP............................................
//.......RRRR............RRRRRR.................PPPP............PPPPPP.............................................
//.......RRRR........RRRRRR.....................PPPP........PPPPPPP................................................
//.......RRRRRRRRRRRRRRRRRR.....................PPPPPPPPPPPPPPPPPP.................................................
//.......RRRRRRRRRRRRRRRRRR.....................PPPPPPPPPPPPPPPP...................................................
//.......RRRR..........RRRR.....................PPPPP.................................+++................+++.......
//.......RRRR...........RRRR....................PPPPP.................................+++................+++.......
//.......RRRR.............RRRR..................PPPPP.................................+++................+++.......
//.......RRRR..............RRRR.................PPPPP...........................+++++++++++++++....+++++++++++++++.
//.......RRRR...............RRRR................PPPPP...........................+++++++++++++++....+++++++++++++++.
//.......RRRR................RRRR...............PPPPP.................................+++................+++.......
//.......RRRR.................RRRR..............PPPPP.................................+++................+++.......
//.......RRRR...................RRRR............PPPPP.................................+++................+++.......
//.................................................................................................................
//.................................................................................................................
//.................................................................................................................
//.................................................................................................................
//.................................................................................................................
[[maybe_unused]]constexpr long long N=1000100;
constexpr bool MultiCase=false;
long long n,ans;
long long a[N];
int main(){
	n=read();
	for(register int i=1;i<=n;++i){
		a[i]=read();
	}
	for(register int i=1;i<=n-1;++i){
		read();
	}
	sort(a+1,a+n+1);
	if(a[1]>0){
		ans=-a[1];
		for(register int i=2;i<=n;++i){
			ans+=a[i];
		}
		return !write(ans);
	}
	for(register int i=1;i<=n;++i){
		ans+=Abs(a[i]);
	}
	return !write(ans);
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 13
Accepted

Test #1:

score: 13
Accepted
time: 26ms
memory: 10248kb

input:

351493
-641495974 -401868912 -864400429 35718599 -579296290 767835327 149511992 -246228754 649472235 893048442 -292675192 -788090312 -578172296 -62289673 196890164 -120059197 -452848333 -216788131 -604555771 -240241020 376984486 -407661514 -107574590 -461679558 -470560314 -583391402 -991686079 76956...

output:

175477002777567

result:

ok 1 number(s): "175477002777567"

Test #2:

score: 13
Accepted
time: 26ms
memory: 10320kb

input:

351493
-56100243 368534199 129964394 -89815018 -91235204 957523014 -460852634 -325788014 -402912154 321855921 454630730 558766063 227409254 -961488779 421605421 691666242 -230378151 -162955273 -236886327 -612720805 897977225 -86952503 798514303 108426380 652820044 -570978053 -646910035 -167973689 -7...

output:

175582921565606

result:

ok 1 number(s): "175582921565606"

Test #3:

score: 13
Accepted
time: 29ms
memory: 9072kb

input:

351493
763351894 914829770 269353066 -650659200 -281614670 -384638266 266301720 599060286 929263636 -383459829 900862182 -735284265 -207058691 -896484301 821480927 90661512 -679895618 -995726473 511471086 669880712 461077012 -131405343 997734902 -904033660 245840121 355028008 -909036951 530267463 93...

output:

175928061618383

result:

ok 1 number(s): "175928061618383"

Test #4:

score: 13
Accepted
time: 27ms
memory: 9000kb

input:

351493
-476871284 310380923 -524195986 740923407 -507205286 -708342444 845300375 163395319 -118327194 -777909892 -864449914 19995101 -709759263 -967727722 922294345 -493915772 -812562398 -365413759 787107009 4270638 -295451830 -162056816 -884264923 -870042647 -996069213 573972294 155864269 -58906286...

output:

175650564210340

result:

ok 1 number(s): "175650564210340"

Test #5:

score: 13
Accepted
time: 33ms
memory: 10324kb

input:

351493
-173531743 557238083 -824113374 -84997552 -528741973 -448737148 -646930897 649003342 -608133665 912285973 -922564290 602546534 116884217 -500565119 526827675 123739579 41774236 205999423 15304413 861611850 39040664 895088899 43155838 -326769005 671029213 124031672 249778755 -644568506 9118445...

output:

175833127330368

result:

ok 1 number(s): "175833127330368"

Test #6:

score: 13
Accepted
time: 30ms
memory: 10276kb

input:

351493
867082022 -654438792 -563132739 -602771213 -498674813 -925363988 -32298673 -538019554 -334530735 571873145 -583030757 -378539176 119681995 -90196121 460241188 -516789360 211603768 -509897029 -852347880 830444888 269349329 -428858753 -137073395 130042891 644002528 -137140981 979900884 36818325...

output:

175483737223472

result:

ok 1 number(s): "175483737223472"

Test #7:

score: 13
Accepted
time: 34ms
memory: 10280kb

input:

351493
-447335302 -476762578 372057221 936789657 357038272 909731828 -683347165 637447470 913095563 316451704 414765801 786600053 -65647567 924518593 -769778430 -347838583 923771357 54765382 355559903 -210849764 194278668 612466423 120679972 -184875188 -467919689 -45407455 -881561838 -591488257 2692...

output:

175817072416071

result:

ok 1 number(s): "175817072416071"

Test #8:

score: 13
Accepted
time: 26ms
memory: 8592kb

input:

351493
402240742 668233786 -889881161 457723983 862248981 -258221456 961999793 -357283684 -906564302 -597314876 739970397 -677435760 -950807663 -637315042 -933332320 277627831 540469730 711450896 -516333572 663145310 104913901 -511477049 703469693 -593297236 -407591592 804894830 504458817 -220727610...

output:

175806964829997

result:

ok 1 number(s): "175806964829997"

Test #9:

score: 13
Accepted
time: 30ms
memory: 10368kb

input:

351493
76730680 435846940 -794852623 555620609 -611204625 838568963 -703848513 -448239085 -115097249 -41368701 370845103 -523596605 -574028136 -999717105 -940170307 -882957379 168314209 462026163 -596102197 223187871 -231867307 165204442 -217815785 982666489 616325768 -834213481 -7172241 587603787 9...

output:

175645279435054

result:

ok 1 number(s): "175645279435054"

Test #10:

score: 13
Accepted
time: 29ms
memory: 10328kb

input:

351493
-418521650 -556841193 201271611 -455552220 660456263 -188352499 400020859 986402784 -477116947 -886627587 -840995307 438113972 -154696898 -817068532 -876194676 -576445413 -955919626 -10695871 313744268 -647421383 -836372934 -41870379 -384156565 570580595 136462961 602569688 644933476 52733996...

output:

175802261388786

result:

ok 1 number(s): "175802261388786"

Test #11:

score: 13
Accepted
time: 30ms
memory: 9088kb

input:

351493
-130691318 904648843 -732528532 646985259 8633249 -936982284 497541179 640396747 650407531 458099270 -690004072 889148550 -350891786 120609938 -210082522 -729055455 -507136771 754502959 742704465 -771332127 41517881 815637674 193201716 -748352958 816227236 8740519 661093724 -269939318 7725096...

output:

175701865379333

result:

ok 1 number(s): "175701865379333"

Test #12:

score: 13
Accepted
time: 30ms
memory: 9360kb

input:

351493
-66854912 -950343871 -199904682 509621680 495040850 929289473 158195385 24793111 617279847 -851601360 -376102480 -28253220 526524472 165842584 -938843661 -255803056 427156408 -921301927 -493038885 -301127735 -392384028 -897791614 -404752254 -331044497 640039210 -718591427 -655295253 -78657017...

output:

175609650615928

result:

ok 1 number(s): "175609650615928"

Test #13:

score: 13
Accepted
time: 30ms
memory: 8860kb

input:

351493
78301096 -52604596 821967420 17665215 -854562351 531797012 531579374 -630259969 483552256 -406544826 -444229744 -36337606 -923613351 572356707 150744251 -893122680 -867494723 -787026829 -57721719 854240591 -997955163 -521393917 -601344208 428938884 -361341200 -930370842 511195865 657470791 -9...

output:

175839770381205

result:

ok 1 number(s): "175839770381205"

Test #14:

score: 13
Accepted
time: 30ms
memory: 10360kb

input:

351493
-386682919 -77525384 946023467 359887410 608228613 -61098422 -221702696 677632268 -464778216 -208646176 376278620 -174464731 -71286142 545647495 775301975 360115639 210057946 930655420 -285693349 264575602 -205129496 148376086 -723599206 671466170 -516424717 -456455162 -412650777 -833372579 -...

output:

175710205504618

result:

ok 1 number(s): "175710205504618"

Test #15:

score: 13
Accepted
time: 34ms
memory: 8760kb

input:

351493
180349695 744582170 -231466196 311156193 -918224163 742801932 499244357 -122245208 -945991826 632811907 -702788218 -377450924 -127055866 413899582 377349215 -109237274 875498449 984669327 -582590434 -535969194 -515202930 -865614356 712340219 -432417784 -259839200 -334614797 629153456 45235977...

output:

176087255650160

result:

ok 1 number(s): "176087255650160"

Test #16:

score: 13
Accepted
time: 34ms
memory: 10304kb

input:

351493
109291948 656740495 -240687300 816865496 842030537 -83872038 945788784 -175127748 -220378521 -514168111 -75918273 -424031742 618185653 -425893462 184086440 246901383 84933177 484058459 -92426164 41491205 -322743318 -110098421 870843057 441185062 -905737330 -905272154 -954353925 -645539990 -87...

output:

175519371658187

result:

ok 1 number(s): "175519371658187"

Test #17:

score: 13
Accepted
time: 28ms
memory: 10264kb

input:

351493
-614599670 -474846006 -710707577 106808435 -164026900 -724701218 -303848501 558316928 270492819 282023076 -782348251 -886449416 984530125 -357437687 258764323 418885593 479670569 -80377126 754298657 812349532 -410328644 665455088 -524573843 -608180507 987618127 -953474049 -639822420 14005562 ...

output:

175786283410751

result:

ok 1 number(s): "175786283410751"

Test #18:

score: 13
Accepted
time: 30ms
memory: 10376kb

input:

351493
313622497 -362940646 -140097326 256552576 724046027 -409629799 414191927 -893521269 468491250 -617455748 586032127 119415071 378904243 351070874 -986532004 663803846 -866585240 954006674 -955305655 -448803947 621831295 865445237 -543156005 611055742 23286086 343559876 921703921 149690983 -586...

output:

175515918477177

result:

ok 1 number(s): "175515918477177"

Test #19:

score: 13
Accepted
time: 25ms
memory: 10268kb

input:

351493
210604902 501648292 658492051 -525347627 -355907514 215124219 -86804060 996495834 -188590493 -641319941 -220244419 141195062 806233339 -318366404 25549101 -172002820 -797770181 670028866 734746879 -815883678 -641475613 796222600 407452159 -634832863 500778632 640126487 -119988287 294492816 75...

output:

175726295662131

result:

ok 1 number(s): "175726295662131"

Test #20:

score: 13
Accepted
time: 29ms
memory: 8416kb

input:

351493
-843129055 -348494677 -733126523 -699082751 -414986184 -488503685 -801447831 826403161 -690681531 -978669772 -100314374 -11538509 -697056616 719592518 511215252 -522716064 535232416 91782539 739147694 -280251272 -529888836 942685287 861536350 331302306 782848263 648864506 -945194734 -20036503...

output:

175405997725361

result:

ok 1 number(s): "175405997725361"

Subtask #2:

score: 6
Accepted

Test #21:

score: 6
Accepted
time: 32ms
memory: 10276kb

input:

351493
915594742 688454502 456077914 208864399 625937959 102483811 538999077 529481828 400375958 387560315 83710527 83424975 330114353 684812426 68052931 28849220 295907801 535129167 967891325 124069427 644256858 757666812 558755455 178666038 177054898 795236216 848264282 669310447 328353372 3681163...

output:

175766699890054

result:

ok 1 number(s): "175766699890054"

Test #22:

score: 6
Accepted
time: 28ms
memory: 10336kb

input:

351493
558106095 906433626 370590649 172443229 359294152 56072006 85811676 997806511 819710547 234550001 616962251 426062666 836364151 264171065 793148682 129635867 178265836 843676703 590478956 841451015 534070481 684617914 671870778 955426286 402736154 219850741 31973708 468849347 318576756 566186...

output:

175789713405292

result:

ok 1 number(s): "175789713405292"

Test #23:

score: 6
Accepted
time: 28ms
memory: 10272kb

input:

351493
697337673 266522793 679080819 687432689 315959590 268236149 622432001 129168391 88821388 63460774 833956640 413225945 865578649 11740512 786453528 891490067 227393189 334925606 170461981 87131025 281424141 946670090 604404324 925017592 888575931 471618837 629432076 743503791 324979198 8629246...

output:

175724312347028

result:

ok 1 number(s): "175724312347028"

Test #24:

score: 6
Accepted
time: 29ms
memory: 10560kb

input:

351493
9531759 599942847 513281388 9882449 796417077 291041867 324675328 353930252 412321421 947586559 980567086 932827768 615572841 156171760 286692109 886990028 854036272 728463778 206412416 607769313 369514800 628501404 675176090 546072905 149647950 881372300 854487923 790989321 278143384 9314385...

output:

176060086769570

result:

ok 1 number(s): "176060086769570"

Test #25:

score: 6
Accepted
time: 28ms
memory: 9076kb

input:

351493
643775169 784877155 491694248 460219180 421128561 836782766 473863207 74882458 186014002 171438888 487180871 816794740 59414460 519426472 148886585 918349979 15159789 599907429 955714969 506035160 720124140 982522735 4982763 971414716 606296383 279256990 561146067 112502530 687865897 90245951...

output:

175648851969743

result:

ok 1 number(s): "175648851969743"

Test #26:

score: 6
Accepted
time: 25ms
memory: 9064kb

input:

351493
123237838 283456533 538135616 244437927 706620575 310122605 992938749 472163222 432235898 484245342 707496878 494795908 169710548 623933631 26633626 961248631 718394700 717089363 9197104 187450047 894757617 248877232 996630094 315805422 595658941 572547722 304120890 318645450 136013835 705343...

output:

176082772867468

result:

ok 1 number(s): "176082772867468"

Test #27:

score: 6
Accepted
time: 27ms
memory: 8716kb

input:

351493
493928676 984704906 762295072 154664431 387000499 896160744 324405265 308004744 146928584 286540247 476051634 29387846 153694128 904411262 235634769 90897616 716372605 164062799 287383600 987535709 912413555 578718041 845850944 780667717 349187025 181006164 269798770 457360038 11494473 586660...

output:

175982434649427

result:

ok 1 number(s): "175982434649427"

Test #28:

score: 6
Accepted
time: 24ms
memory: 10304kb

input:

351493
373358965 951308820 424481180 333184243 762747734 299885513 496753597 384905589 952388078 213620815 278496250 26390625 340233798 679563691 954378041 269675534 688200374 328300513 630660987 729017309 708106475 394616923 85958853 207679917 920694818 428823833 200109332 105757527 672789240 17044...

output:

175523574288506

result:

ok 1 number(s): "175523574288506"

Test #29:

score: 6
Accepted
time: 27ms
memory: 10476kb

input:

351493
506414637 19246988 476208040 321308506 350947555 498933784 814387431 524390797 694368970 992574521 392132519 681977993 617740744 398570047 955429187 794467660 445101459 899280020 672979531 62822811 91114630 397022041 36970950 413181439 297515602 132779417 715324259 85542261 118543552 62088701...

output:

175964348079203

result:

ok 1 number(s): "175964348079203"

Test #30:

score: 6
Accepted
time: 32ms
memory: 10372kb

input:

351493
198986773 906039921 401561964 93692787 563587809 277069277 678358946 609472935 100076981 910544643 304070724 326539759 555008482 797065754 463351941 521204940 580755165 70283699 968677479 678670254 461445625 53081211 818350939 282327778 123198870 873506 986227805 684460826 703461192 383879044...

output:

175742703185211

result:

ok 1 number(s): "175742703185211"

Test #31:

score: 6
Accepted
time: 29ms
memory: 10372kb

input:

351493
80155259 677489804 317709905 738646332 926916041 417796814 406341624 483755769 292807023 179580462 793077212 266345199 545969570 486044911 715470803 444124568 31002634 985463900 389193993 592838646 861091277 63490585 660350533 828216029 427234331 20581790 342489221 996887734 917735536 8984175...

output:

176015004295927

result:

ok 1 number(s): "176015004295927"

Test #32:

score: 6
Accepted
time: 32ms
memory: 10476kb

input:

351493
502158417 129819235 891767970 99219238 183211216 247517042 540523173 223127548 890246367 488281842 142446217 419214467 64348530 964962625 160502713 368547515 849639720 446159538 419790713 352578054 409914263 635929477 175211453 71785060 341607425 623960228 540374304 235478238 941333686 405860...

output:

175933407600618

result:

ok 1 number(s): "175933407600618"

Test #33:

score: 6
Accepted
time: 28ms
memory: 9076kb

input:

351493
398441962 739520539 491612719 742311876 374717677 206652911 205850479 766243471 807089323 737974241 255255614 662249856 427102454 708382982 50385340 588046648 257468479 272568562 823245583 37260800 566193872 806916151 739940499 741176228 282055372 245646403 597782839 681382879 988980236 56915...

output:

175770971030507

result:

ok 1 number(s): "175770971030507"

Test #34:

score: 6
Accepted
time: 32ms
memory: 10304kb

input:

351493
880628558 121299849 543626556 62033726 562477905 807001043 375706344 218418912 907912385 670274061 135077427 922954507 32404993 210176781 996211632 619526575 919287588 729593055 761653998 610447247 809155528 512214275 521742984 864589741 530033320 679020122 655547772 939779173 682018784 71763...

output:

175730808311141

result:

ok 1 number(s): "175730808311141"

Test #35:

score: 6
Accepted
time: 20ms
memory: 9308kb

input:

351493
648831108 530007650 638538805 608006345 296077170 329899021 678769314 440482296 786721906 668042529 665202240 65800140 350709681 770903722 132697538 767023695 734488378 823129781 81049058 17970450 369322341 159217770 161299857 770481561 200199260 666640973 804754414 446866493 126946712 153790...

output:

175403445299245

result:

ok 1 number(s): "175403445299245"

Test #36:

score: 6
Accepted
time: 33ms
memory: 10312kb

input:

351493
502044059 501804302 211313768 511242 940995264 692839783 506574553 788353346 414910991 728892560 163315468 703340870 64162305 265589155 728350156 90806809 279802465 603050289 583538947 889537982 296696464 894996691 664404573 517096711 643986848 746421610 511916825 917579434 354474598 16810987...

output:

175704819099603

result:

ok 1 number(s): "175704819099603"

Test #37:

score: 6
Accepted
time: 28ms
memory: 10328kb

input:

351493
928817795 15279764 129664762 227080241 523789462 737285062 435944240 506893816 48628908 163684964 26567120 773587005 417584420 284427030 541080558 551027755 533540940 323802299 559241453 839256263 519627534 412275450 563331642 815778319 614934015 836399328 769156966 589297693 908680090 798560...

output:

175889450274061

result:

ok 1 number(s): "175889450274061"

Test #38:

score: 6
Accepted
time: 32ms
memory: 8492kb

input:

351493
251823026 589762742 883250226 961879394 735612675 902451776 40728364 60794721 55273426 161191483 59454831 807594742 528956045 913984188 24433970 559087551 115859648 526548286 32135802 697916215 58068040 394191777 509967320 883927969 307425399 597909709 568479829 932237308 679211452 562575518 ...

output:

175666089806924

result:

ok 1 number(s): "175666089806924"

Test #39:

score: 6
Accepted
time: 32ms
memory: 9180kb

input:

351493
985558020 54549874 730558353 134850543 426343132 553651399 98142769 39888642 60620869 919884891 642437383 798573040 753253917 962593094 378736236 977464159 307193246 831091882 406048067 858980717 316565234 586557313 893832302 589087976 295813039 297530468 815341048 84460051 664360694 54719444...

output:

175692300229036

result:

ok 1 number(s): "175692300229036"

Test #40:

score: 6
Accepted
time: 32ms
memory: 9000kb

input:

351493
795244249 805155169 525778916 836974679 299806591 692112605 622788823 43709098 172248498 161804880 803887069 398609832 320064475 776199168 867218919 146403854 81784201 663602929 874781937 276829658 612886854 545957546 753834680 356435736 62451554 626249096 280389459 216467831 587882687 849844...

output:

175668620388263

result:

ok 1 number(s): "175668620388263"

Subtask #3:

score: 0
Wrong Answer

Test #41:

score: 11
Accepted
time: 1ms
memory: 5536kb

input:

7
247522519 398923496 -976223527 806215585 -937536479 -130552271 90576461
1 2 1 2 5 5

output:

3587550338

result:

ok 1 number(s): "3587550338"

Test #42:

score: 11
Accepted
time: 1ms
memory: 5628kb

input:

7
-822791105 523257970 894601243 -90617653 -41818991 -868075494 -944374389
1 2 3 3 5 2

output:

4185536845

result:

ok 1 number(s): "4185536845"

Test #43:

score: 11
Accepted
time: 1ms
memory: 5532kb

input:

7
-566350725 996649344 340685939 565531548 -379550593 -183515822 -6548810
1 2 3 4 5 6

output:

3038832781

result:

ok 1 number(s): "3038832781"

Test #44:

score: 11
Accepted
time: 1ms
memory: 5628kb

input:

7
-343171001 -403362511 46959184 -369697450 -102687963 -567117121 955599726
1 1 2 4 4 4

output:

2788594956

result:

ok 1 number(s): "2788594956"

Test #45:

score: 11
Accepted
time: 1ms
memory: 5632kb

input:

7
173828143 336914236 941275489 295810310 -887412118 -714471730 -912582442
1 2 1 1 2 2

output:

4262294468

result:

ok 1 number(s): "4262294468"

Test #46:

score: 11
Accepted
time: 1ms
memory: 5576kb

input:

7
-572833222 21134507 42426361 861990387 -480811920 230941373 544927922
1 2 3 3 5 6

output:

2755065692

result:

ok 1 number(s): "2755065692"

Test #47:

score: 11
Accepted
time: 1ms
memory: 5632kb

input:

7
-680443605 -209348563 840970142 -137922464 901658290 459523902 264391423
1 1 1 1 3 4

output:

3494258389

result:

ok 1 number(s): "3494258389"

Test #48:

score: 11
Accepted
time: 1ms
memory: 5576kb

input:

7
894515913 -285833848 200232559 -124848987 -155423899 -388397871 -738157137
1 2 1 3 4 1

output:

2787410214

result:

ok 1 number(s): "2787410214"

Test #49:

score: 11
Accepted
time: 0ms
memory: 5624kb

input:

7
-642380669 158308062 -127045342 711767901 -181174983 -826955836 -244494777
1 1 2 2 2 3

output:

2892127570

result:

ok 1 number(s): "2892127570"

Test #50:

score: 11
Accepted
time: 0ms
memory: 5508kb

input:

7
-449719640 653672153 -305651153 -120669406 801070860 856021669 75279964
1 2 3 4 5 1

output:

3262084845

result:

ok 1 number(s): "3262084845"

Test #51:

score: 11
Accepted
time: 1ms
memory: 5632kb

input:

7
-33901197 115600154 -335654692 -679018907 458398904 149062361 -984194456
1 2 2 4 3 1

output:

2755830671

result:

ok 1 number(s): "2755830671"

Test #52:

score: 0
Wrong Answer
time: 1ms
memory: 5740kb

input:

7
516920012 53907302 586206756 495875317 -54807878 -985037423 -764269876
1 1 2 2 2 5

output:

3457024564

result:

wrong answer 1st numbers differ - expected: '3347408808', found: '3457024564'

Subtask #4:

score: 0
Skipped

Dependency #3:

0%

Subtask #5:

score: 0
Skipped

Dependency #4:

0%

Subtask #6:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

0%