蒟蒻求问UKE是什么错误?
查看原帖
蒟蒻求问UKE是什么错误?
297913
青鱼Official楼主2020/8/2 11:55
#include <bits/stdc++.h>
#define pb(whatwhat) push_back(whatwhat)
#define rs(whatwhat) resize(whatwhat)
using namespace std;
template <typename T>inline void read(T& t){
    t=0;
    register char ch=getchar();
    while(!('0'<=ch&&ch<='9')){
        if(ch=='-') t*=-1;
        ch=getchar();
    }
    while(('0'<=ch&&ch<='9')){
        t=((t<<1)+(t<<3))+ch-'0';
        ch=getchar();
    }
}
template <typename T,typename... Args> inline void read(T& t, Args&... args){
    read(t);read(args...);
}
template <typename T>inline void write(T x){
    if(x<0) putchar('-'),x=~(x-1);
    int s[30],top=0;
    while(x) s[++top]=x%10,x/=10;
    if(!top) s[++top]=0;
    while(top) putchar(s[top--]+'0');
}
struct GJ{
    static const int M=12014;
    int num[M+10],len;
    bool __fu;
    GJ(){clean();}
    void clean(){
        memset(num,0,sizeof(num));
        len=1;
        __fu=0;
    }
    void Read(){
        char str[M+10];
        scanf("%s",str);
        len=strlen(str);
        if(str[0]=='-'){
        	__fu=1;
    	    for(register int i=1;i<len;++i)
         	   num[i]=str[len-i]-'0';
         	len--;
		}else{
	        for(register int i=1;i<=len;++i)
	            num[i]=str[len-i]-'0';
		}
    }
    void Write(bool IakIOI){
    	if(__fu) putchar('-');
    	for(register int i=len;i>=1;--i)
            putchar(num[i]+'0');
        if(IakIOI) puts("");
        else /*您输出了空气。*/;
    }
    template <typename T>inline void itoBig(T x){
        clean();
        while(x!=0){
            num[len++]=x%10;
            x/=10;
        }
        if(len!=1)len--;
    }
    template <typename T>inline GJ turnGJ(T x){
        GJ ___gj;
        if(x<0){
        	x=abs(x);
        	___gj.__fu=1;
		}
        while(x!=0){
            ___gj.num[___gj.len++]=x%10;
            x/=10;
        }
        if(___gj.len!=1)___gj.len--;
        return ___gj;
    }
    bool operator < (const GJ &cmp)const{
        if(len!=cmp.len) return len<cmp.len;
        for(register int i=len;i>=1;--i)
            if(num[i]!=cmp.num[i]) return num[i]<cmp.num[i];
        return false;
    }
    bool operator > (const GJ &cmp)const{return cmp<*this;}
    bool operator <= (const GJ &cmp)const{return !(cmp<*this);}
    bool operator != (const GJ &cmp)const{return cmp<*this||*this<cmp;}
    bool operator == (const GJ &cmp)const{return !(cmp<*this||*this<cmp);}
    GJ operator + (const GJ &A)const{
    	if(A.__fu&&__fu){
    		auto _____tmp=*this,____tmp=A;
    		_____tmp.__fu=0;____tmp.__fu=0;
        	auto ___S=_____tmp+____tmp;
        	___S.__fu=1;
        	return ___S;
		}
        if(A.__fu){
        	auto ____tmp=A;
        	____tmp.__fu=0;
        	auto ___S=*this-____tmp;
        	return ___S;
		}
		if(__fu){
			auto ___tmp=*this;
			___tmp.__fu=0;
			auto ___S=A-___tmp;
        	return ___S;
		}
        GJ S;
        S.len=max(len, A.len);
        for(register int i=1;i<=S.len;++i){
            S.num[i]+=num[i]+A.num[i];
            if(S.num[i]>=10){
                S.num[i]-=10;
                S.num[i+1]++;
            }
        }
        while(S.num[S.len+1])S.len++;
        return S;
    }
    GJ operator - (const GJ &A)const{
    	if(A.__fu&&__fu){
    		auto _S=A;
    		_S.__fu=0;
    		auto __S=*this+_S;
    		return __S;
		}
    	if(A.__fu){
    		auto _S=A;
    		_S.__fu=0;
    		auto __S=*this+_S;
    		return __S;
		}
    	if(__fu){
    		GJ _tmpp,_tmppp;
    		_tmpp=*this;
    		_tmpp.__fu=0;
    		_tmppp=A;
    		_tmppp.__fu=0;
    		auto SSS=_tmpp+_tmppp;
    		SSS.__fu=1;
    		return SSS;
		}
    	if(*this<A){
    		putchar('-');
    		auto S=A-*this;
    		return S;
		}
        GJ S;
        S.len=max(len,A.len);
    	for(register int i=1;i<=S.len;++i){
            S.num[i]+=num[i]-A.num[i];
            if(S.num[i]<0){
                S.num[i]+=10;
                S.num[i+1]--;
            }
        }
        while(!S.num[S.len]&&S.len>1)S.len--;
        return S;
    }
    GJ operator * (const GJ &A)const{
        GJ S;
        if((A.__fu xor __fu)) S.__fu=1;
        if((A.len==1&&A.num[1]==0)||(len==1&&num[1]==0)) return S;
        S.len=A.len+len-1;
        for(register int i=1;i<=len;++i)
            for(register int j=1;j<=A.len;++j){
				S.num[i+j-1]+=num[i]*A.num[j];
				S.num[i+j]+=S.num[i+j-1]/10;
				S.num[i+j-1]%=10;
            }
        while(S.num[S.len+1])S.len++;
        return S;
    }
    GJ operator / (const GJ &A)const{
        GJ S;
        if((A.__fu xor __fu)) S.__fu=1;
		if((A.len==1&&A.num[1]==0)||(len==1&&num[1]==0))return S;
      	GJ R,N;
        S.len=0;
        for(register int i=len;i>=1;--i){
            N.itoBig(10);
            R=R*N;
            N.itoBig(num[i]);
            R=R+N;
            int flag=-1;
            for(register int j=1;j<=10;++j){
                N.itoBig(j);
                if(N*A>R){
                    flag=j-1;
                    break;
                }
            }
            S.num[++S.len]=flag;
            N.itoBig(flag);
            R=R-N*A;
        }
        for(register int i=1;i<=len/2;++i)swap(S.num[i],S.num[len-i+1]);
        while(!S.num[S.len]&&S.len>1)S.len--;
        return S;
    }
    GJ operator % (const GJ &A)const{
        GJ S;
        GJ P=*this/A;
        S=*this-P*A;
        return S;
    }
    void operator = (const GJ &A){
		for(register int i=1;i<=A.len;++i)
			num[i]=A.num[i];
		len=A.len;
		__fu=A.__fu;
	}
};
GJ a,b;
int main()
{
	a.Read();
	b.Read();
	auto c=a+b,d=a-b,e=a*b,f=a/b,g=a-(f*b);
	if(a<b){
		g=b%a;
	}
	c.Write(1);
	d.Write(1);
	e.Write(1);
	f.Write(1);
	g.Write(1);
    return 0;
}

从来没有遇到过UKE诶?

Unknown Error. The checker ran into an unexpected error: ExecutionResult(cpu_time=8, real_time=61, memory=557056, exit_code=0, signal=0, exceed=None)

/bin/bash: fork: retry: Resource temporarily unavailable
/bin/bash: fork: retry: Resource temporarily unavailable
/bin/bash: fork: retry: Resource temporarily unavailable
wrong answer On line 1 column 1, read -, expected 6.

这是第4个点的错误信息,其他的太长了,没想贴过来、、、

并且在记录里显示的状态还是Judging

2020/8/2 11:55
加载中...