QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#251969#7747. Memoryucup-team1447#AC ✓4ms1328kbC++148.1kb2023-11-15 13:50:222023-11-22 13:01:36

Judging History

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

  • [2023-11-22 13:01:36]
  • 自动重测本题所有获得100分的提交记录
  • 测评结果:AC
  • 用时:4ms
  • 内存:1328kb
  • [2023-11-15 13:50:23]
  • 评测
  • 测评结果:100
  • 用时:4ms
  • 内存:1292kb
  • [2023-11-15 13:50:22]
  • 提交

answer

// Problem: B. Doremy's Connecting Plan
// Contest: Codeforces - Codeforces Round 906 (Div. 1)
// URL: https://codeforces.com/contest/1889/problem/B
// Memory Limit: 256 MB
// Time Limit: 1000 ms
// 
// Powered by CP Editor (https://cpeditor.org)

// dottle bot
#ifndef ONLINE_JUDGE
#define DEBUG
#endif
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <queue>
#include <vector>
#include <bitset>
#include <map>
#include <assert.h>
#include <math.h>
#include <set>
#define nln puts("")
#define od(x) printf("%d",x)
#define odb(x) printf("%d ",x)
#define odl(x) printf("%d\n",x)
#define odp(x,y) printf("%d %d\n",x,y)
#define ol(x) puts("")
#define old(x) printf("%lld",x)
#define oldb(x) printf("%lld ",x)
#define oldl(x) printf("%lld\n",x)
#define oldp(x,y) printf("%lld %lld\n",x,y)
#define rg(x) for(int i=1;i<=(x);i++){
#define rg_(i,x) for(int i=1;i<=(x);i++){
#define fe(u) for(int i=h[u];i;i=e[i].nxt){int v=e[i].v;
#define gr }
#define rrg(x) for(int i=0;i<(x);i++){
#define rdln(a) a[i]=read();
#define rdln0(a,x) rrg(x) rdln(a) gr
#define rdln1(a,x) rg(x) rdln(a) gr

#define int long long
const int mod=998244353;
#ifdef int 
#define inf 0x3f3f3f3f3f3f3f3fll
#else 
#define inf 0x3f3f3f3f
#endif
inline int min(int a,int b){return a>b?b:a;}
inline int max(int a,int b){return a<b?b:a;}
#define cmlSEGMIN
#define cmlSEGMAX
#define cmlSEGSUM
class SegTreeAl{
#ifdef cmlSEGMIN
	int minn[1000005<<2];
#endif
#ifdef cmlSEGMAX
	int maxn[1000005<<2];
#endif
#ifdef cmlSEGSUM
	int sum[1000005<<2];
#endif
	int tag[1000005<<2];
#ifdef cmlSEGSUM
	void pushdown(int o,int l,int r)
#else 
	void pushdown(int o)
#endif
	{
		int&t=tag[o];
#ifdef cmlSEGMIN
		minn[o<<1]+=t;
		minn[o<<1|1]+=t;
#endif
#ifdef cmlSEGMAX
		maxn[o<<1]+=t;
		maxn[o<<1|1]+=t;
#endif
#ifdef cmlSEGSUM
		int m=l+r>>1;
		sum[o<<1]+=t*(m-l+1);
		sum[o<<1|1]+=t*(r-m);
#endif
		tag[o<<1]+=t;
		tag[o<<1|1]+=t;
		t=0;
	}
	void add(int o,int l,int r,int L,int R,int v)
	{
		if(L<=l&&r<=R)
		{
#ifdef cmlSEGMAX
			maxn[o]+=v;
#endif
#ifdef cmlSEGMIN
			minn[o]+=v;
#endif
#ifdef cmlSEGSUM
			sum[o]+=v*(r-l+1);
#endif
			tag[o]+=v;
			return;
		}
		int m=l+r>>1;
#ifdef cmlSEGSUM
		pushdown(o,l,r);
#else
		pushdown(o);
#endif
		if(L<=m)add(o<<1,l,m,L,R,v);
		if(m<R)add(o<<1|1,m+1,r,L,R,v);
#ifdef cmlSEGMAX
		maxn[o]=max(maxn[o<<1],maxn[o<<1|1]);
#endif
#ifdef cmlSEGMIN
		minn[o]=min(minn[o<<1],minn[o<<1|1]);
#endif
#ifdef cmlSEGSUM
		sum[o]=sum[o<<1]+sum[o<<1|1];
#endif
	}
#ifdef cmlSEGMIN
	int qmin(int o,int l,int r,int L,int R)
	{
		if(L<=l&&r<=R)
		{
			return minn[o];
		}
		int m=l+r>>1,res=inf;
#ifdef cmlSEGSUM
		pushdown(o,l,r);
#else
		pushdown(o);
#endif
		if(L<=m)res=min(res,qmin(o<<1,l,m,L,R));
		if(m<R)res=min(res,qmin(o<<1|1,m+1,r,L,R));
#ifdef cmlSEGMAX
		maxn[o]=max(maxn[o<<1],maxn[o<<1|1]);
#endif
#ifdef cmlSEGMIN
		minn[o]=min(minn[o<<1],minn[o<<1|1]);
#endif
#ifdef cmlSEGSUM
		sum[o]=sum[o<<1]+sum[o<<1|1];
#endif
		return res;
	}
#endif

#ifdef cmlSEGMAX
	int qmax(int o,int l,int r,int L,int R)
	{
		if(L<=l&&r<=R)
		{
			return maxn[o];
		}
		int m=l+r>>1,res=-inf;
#ifdef cmlSEGSUM
		pushdown(o,l,r);
#else
		pushdown(o);
#endif
		if(L<=m)res=max(res,qmax(o<<1,l,m,L,R));
		if(m<R)res=max(res,qmax(o<<1|1,m+1,r,L,R));
#ifdef cmlSEGMAX
		maxn[o]=max(maxn[o<<1],maxn[o<<1|1]);
#endif
#ifdef cmlSEGMIN
		minn[o]=min(minn[o<<1],minn[o<<1|1]);
#endif
#ifdef cmlSEGSUM
		sum[o]=sum[o<<1]+sum[o<<1|1];
#endif
		return res;
	}
#endif

#ifdef cmlSEGSUM
	int qsum(int o,int l,int r,int L,int R)
	{
		if(L<=l&&r<=R)
		{
			return sum[o];
		}
		int m=l+r>>1,res=0;
#ifdef cmlSEGSUM
		pushdown(o,l,r);
#else
		pushdown(o);
#endif
		if(L<=m)res+=qsum(o<<1,l,m,L,R);
		if(m<R)res+=qsum(o<<1|1,m+1,r,L,R);
#ifdef cmlSEGMAX
		maxn[o]=max(maxn[o<<1],maxn[o<<1|1]);
#endif
#ifdef cmlSEGMIN
		minn[o]=min(minn[o<<1],minn[o<<1|1]);
#endif
#ifdef cmlSEGSUM
		sum[o]=sum[o<<1]+sum[o<<1|1];
#endif
		return res;
	}
#endif
};
#define newe(n) struct Edge{int v,w,nxt;}e[2*n+5];\
typedef int arr[n+5];\
arr h;\
int cnt=1;\
inline void addedge(int u,int v,int w){e[cnt]=(Edge){v,w,h[u]};h[u]=cnt++;}\
struct node{\
	int u,d;\
	bool operator<(const node&b)const{return d>b.d;}\
};\
void dij(int s,int *d,int N)\
{\
	memset(d,0x3f,sizeof(int)*(N+3));\
	d[s]=0;std::priority_queue<node>q;q.push((node){s,0});\
	while(!q.empty())\
	{\
		int u=q.top().u,D=q.top().d;q.pop();if(D!=d[u])continue;\
		for(int i=h[u];i;i=e[i].nxt){int v=e[i].v,w=e[i].w;\
		if(d[u]+w<d[v])d[v]=d[u]+w,q.push((node){v,d[v]});\
		}\
	}\
}
#define mgs int fa[1<<22],sz[1<<22];\
inline int f(int x){return x==fa[x]?x:fa[x]=f(fa[x]);}\
inline int uf(int x,int y)\
{\
    int fx=f(x),fy=f(y);\
    if(fx==fy)return 0;\
    if(sz[fx]>sz[fy])fx^=fy^=fx^=fy;\
    fa[fx]=fy,sz[fy]+=sz[fx];\
    return 1;\
}
inline int read()
{
    int num=0,f=1;char c=getchar();
    while(c<48||c>57){if(c=='-')f=-1;c=getchar();}
    while(c>47&&c<58)num=num*10+(c^48),c=getchar();
    return num*f;
}
inline int re1d()
{
    char c=getchar();
    while(c<48||c>49)c=getchar();
    return c&1;
}
#ifdef cmlBIT
struct BIT{int a[1<<20|1],n;
void add(int x,int p){while(x<=n)a[x]+=p,x+=x&-x;}
int operator[](int x){int res=0;while(x)res+=a[x],x-=x&-x;return res;}
int operator()(int l,int r){return (*this)[r]-(*this)[l-1];}};
#endif
int rnv[1000005];
// #define COMB
#ifdef COMB
#ifndef int
#define int long long
#endif
int fac[1000005],inv[1000005];
#endif
void initprog()
{
#ifdef COMB
	fac[0]=inv[0]=inv[1]=1;
	rg(1000000)fac[i]=fac[i-1]*i%mod;gr
	rg(1000000)if(i>1)inv[i]=inv[mod%i]*(mod-mod/i)%mod;gr
	rg(1000000)rnv[i]=inv[i];gr
	rg(1000000)inv[i]=inv[i]*inv[i-1]%mod;gr
#endif
}
#ifdef COMB
int C(int n,int m)
{
	if(n==m||m==0)return 1;
	if(n<m)return 0;
	return fac[n]*inv[m]%mod*inv[n-m]%mod;
}
#endif
inline int qp(int a,int b){int c=1;while(b){if(b&1)c=c*a%mod;a=a*a%mod;b>>=1;}return c;}
inline int mae(int &a,int b){a+=b;if(a>=mod)a-=mod;return a;}
inline int mde(int &a,int b){a+=mod-b;if(a>=mod)a-=mod;return a;}
inline int mle(int &a,int b){a=a*b%mod;return a;}
inline int mve(int &a,int b){a=a*qp(b,mod-2)%mod;return a;}
inline int mxe(int &a,int b){return a=a>b?a:b;}
inline int mne(int &a,int b){return a=a<b?a:b;}
inline int ae(int a,int b){int c=a+b;return c>=mod?c-mod:c;}
inline int de(int a,int b){return ae(a,mod-b);}
inline int me(int a,int b){return a*b%mod;}
inline int mive(int &a,int b){a=a*rnv[b]%mod;return a;}
inline int ive(int a,int b){return a*rnv[b]%mod;}
inline int ve(int a,int b){return a*qp(b,mod-2)%mod;}
#ifdef cmlST
struct STmin{
	int a[21][1000005],n;
	void init(int N,int *b)
	{
		n=N;
		rg(n)a[0][i]=b[i];gr
		rg(20)rg_(j,n-(1<<i)+1)a[i][j]=min(a[i-1][j],a[i-1][j+(1<<i-1)]);gr gr
	}
	int q(int l,int r)
	{
		int d=std::__lg(r-l+1);
		return min(a[d][l],a[d][r-(1<<d)+1]);
	}
};
struct STmax{
	int a[21][1000005],n;
	void init(int N,int *b)
	{
		n=N;
		rg(n)a[0][i]=b[i];gr
		rg(20)rg_(j,n-(1<<i)+1)a[i][j]=max(a[i-1][j],a[i-1][j+(1<<i-1)]);gr gr
	}
	int q(int l,int r)
	{
		int d=std::__lg(r-l+1);
		return max(a[d][l],a[d][r-(1<<d)+1]);
	}
};
#endif
#ifdef cmlSAM
struct SAM{
	int ch[1000005][26],lnk[1000005],len[1000005],lst=1,cc=1;
	int sz[1000005];
	void insert(int c)
	{
		len[++cc]=len[lst]+1;sz[cc]=1;
		int p=lst;lst=cc;
		while(p&&ch[p][c]==0)ch[p][c]=cc,p=lnk[p];
		if(p==0)lnk[cc]=1;
		else
		{
			int x=ch[p][c];
			if(len[p]+1==len[x])lnk[cc]=x;
			else
			{
				int q=cc;++cc;
				lnk[cc]=lnk[x];
				lnk[x]=lnk[q]=cc;
				len[cc]=len[p]+1;
				memcpy(ch[cc],ch[x],sizeof(ch[cc]));
				while(p&&ch[p][c]==x)ch[p][c]=cc,p=lnk[p];
			}
		}
	}
	newe(1000005);
	long long ans;
	void build()
	{
		rg(cc)addedge(lnk[i],i,0);gr
	}
	void dfs(int u)
	{
		fe(u)dfs(v),sz[u]+=sz[v];gr
		if(sz[u]>1)ans=max(ans,1ll*sz[u]*len[u]);
	}
}t;
#endif

signed main()
{
	initprog();
	int s=0,H=0;
	int n=read();
	rg(n)
	int x=read();
	if(s&1)s--,H=1;
	s=s/2+x;
	int R=s*2+H;
	if(R>0)putchar('+');
	else putchar(R==0?'0':'-');
	gr
	return 0;
}

这程序好像有点Bug,我给组数据试试?

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 1240kb

input:

10
2 -1 4 -7 4 -8 3 -6 4 -7

output:

+0+-+---+-

result:

ok single line: '+0+-+---+-'

Test #2:

score: 0
Accepted
time: 0ms
memory: 1216kb

input:

10
-1 36 18 18 18 18 18 18 18 -18

output:

-++++++++-

result:

ok single line: '-++++++++-'

Test #3:

score: 0
Accepted
time: 0ms
memory: 1288kb

input:

1000
-1 193552 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 96776 967...

output:

-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++...

result:

ok single line: '-+++++++++++++++++++++++++++++...++++++++++++++++++++++++++++++-'

Test #4:

score: 0
Accepted
time: 3ms
memory: 1324kb

input:

100000
-1 696082628 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 348041314 ...

output:

-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++...

result:

ok single line: '-+++++++++++++++++++++++++++++...++++++++++++++++++++++++++++++-'

Test #5:

score: 0
Accepted
time: 0ms
memory: 1264kb

input:

10
-1 70 -35 -72 36 12 -6 42 -21 -84

output:

-+---+-+--

result:

ok single line: '-+---+-+--'

Test #6:

score: 0
Accepted
time: 0ms
memory: 1220kb

input:

1000
-1 -120742 60371 -567374 283687 -507718 253859 -579246 289623 21402 -10701 539474 -269737 -681332 340666 -746052 373026 -993382 496691 -333880 166940 -632724 316362 909690 -454845 86680 -43340 236688 -118344 -29102 14551 6252 -3126 -440612 220306 -878460 439230 649538 -324769 -651632 325816 882...

output:

---------+-+-----------+-+-+---+-----+---+-+-+---+-+-+-+-+---+-----+-----+---+-+-----+-----+-+-+---+---+-+-----+-------+-+---+-----+-+-+-------+-+-+-+-+-------+-----+-+-+-------+-------+-+-+-------+---+-+---+-+---+-+-+-+---+-+-+-+-+---------+-----+-----+-+-+-+-+-+-+-+---+-+-+-------+---+-+-+-+-+-+--...

result:

ok single line: '---------+-+-----------+-+-+--...+---+-+-+-+-+-----+-+---------+'

Test #7:

score: 0
Accepted
time: 3ms
memory: 1328kb

input:

100000
-1 126247070 -63123535 -440273040 220136520 809537358 -404768679 -927404550 463702275 896759686 -448379843 155450002 -77725001 995415070 -497707535 -730811632 365405816 -223816910 111908455 255855870 -127927935 -78358522 39179261 190117110 -95058555 -61118274 30559137 243732804 -121866402 -48...

output:

-+---+---+-+-+-----+---+---+-------+-+-+---+-----+---+-+-+-----+-+-----+-----+-+---+-+---+---+-+-+-+-+-----------+---+-+-+-------+-+-+---+-----+-------+-+---+-+---------------+-----------------+-+-----+-+-+---+-+-+-+---+-+-----+-+-+---+-+-----+-+-+-----+-----+-+-+-----+-+-+-----+-+---+-+---+-+-+-+--...

result:

ok single line: '-+---+---+-+-+-----+---+---+--...--+-+-+---+---+---+---+-+------'

Test #8:

score: 0
Accepted
time: 0ms
memory: 1292kb

input:

10
0 2 -1 88 -44 14 -7 -32 16 32

output:

0+0+0+0-0+

result:

ok single line: '0+0+0+0-0+'

Test #9:

score: 0
Accepted
time: 0ms
memory: 1236kb

input:

1000
0 804678 -402339 501804 -250902 701336 -350668 341920 -170960 234558 -117279 138082 -69041 383094 -191547 613608 -306804 -173632 86816 105660 -52830 268340 -134170 -786944 393472 -702908 351454 236550 -118275 83428 -41714 280776 -140388 -743190 371595 -762656 381328 -873564 436782 565326 -28266...

output:

0+0+0+0+0+0+0+0+0-0+0+0-0-0+0+0+0-0-0-0+0+0-0-0+0+0-0+0-0+0-0+0-0-0-0+0+0+0-0+0+0-0-0+0+0+0-0+0-0-0+0-0-0-0-0-0+0-0+0-0-0-0+0-0+0-0+0+0-0+0-0+0-0+0-0-0+0+0-0+0-0+0-0+0-0+0+0+0-0+0-0-0-0+0+0-0+0+0+0+0+0-0+0-0+0-0+0+0-0-0-0+0+0+0+0-0+0-0-0+0+0-0-0+0+0+0-0+0+0-0+0-0+0+0-0+0-0+0+0+0-0+0-0-0-0-0-0+0-0+0+...

result:

ok single line: '0+0+0+0+0+0+0+0+0-0+0+0-0-0+0+...-0-0+0+0+0-0-0-0-0-0+0-0+0-0+0+'

Test #10:

score: 0
Accepted
time: 3ms
memory: 1236kb

input:

100000
0 281054714 -140527357 181299510 -90649755 -155852956 77926478 804466996 -402233498 100794828 -50397414 -498194394 249097197 674196350 -337098175 947822240 -473911120 649015454 -324507727 -445192880 222596440 517778906 -258889453 580158794 -290079397 -634780702 317390351 -689237014 344618507 ...

output:

0+0+0-0+0+0-0+0+0+0-0+0+0-0-0-0+0-0-0+0+0-0-0+0+0+0+0+0-0+0+0-0-0-0+0+0+0-0+0+0-0-0-0-0-0-0+0+0-0-0+0+0-0+0+0+0+0-0+0-0-0+0+0-0+0-0-0+0+0-0+0+0+0-0+0+0+0-0+0-0-0+0-0-0-0-0-0-0+0-0-0-0+0-0-0+0+0+0+0-0-0+0-0+0-0+0+0-0+0-0+0-0+0+0+0-0-0+0-0+0-0+0+0-0+0+0+0+0+0+0+0-0+0-0+0+0+0-0-0-0+0-0+0-0-0+0-0-0-0-0-...

result:

ok single line: '0+0+0-0+0+0-0+0+0+0-0+0+0-0-0-...-0-0-0+0+0-0+0+0+0+0+0-0-0-0+0-'

Test #11:

score: 0
Accepted
time: 0ms
memory: 1208kb

input:

10
1 96 -48 -50 25 38 -19 -16 8 64

output:

+++-+++-++

result:

ok single line: '+++-+++-++'

Test #12:

score: 0
Accepted
time: 0ms
memory: 1208kb

input:

1000
1 -233282 116641 245142 -122571 -866732 433366 342040 -171020 -114326 57163 -723670 361835 559940 -279970 47632 -23816 -546562 273281 -677060 338530 189622 -94811 206166 -103083 -354146 177073 -503094 251547 671860 -335930 -810126 405063 -743936 371968 -799120 399560 579380 -289690 -829990 4149...

output:

+-+++-+++-+-+++++-+-+++++-+-+++-+-+-+++-+++-+++++++++++++++-+-+-+++++++++++++++++-+-+-+++++-+-+-+++++++++++++-+++++-+-+-+-+++++-+-+-+++-+++-+-+-+++++-+-+-+++-+++-+++++++-+-+++-+++-+-+-+++-+++-+-+-+++-+-+-+++-+++++-+-+++-+-+-+++++++++++++-+-+-+++-+++-+++++-+++++++++-+-+++++-+++-+-+++-+-+-+-+-+-+-+-+-...

result:

ok single line: '+-+++-+++-+-+++++-+-+++++-+-++...++-+++++-+++++-+-+++++-+-+++++-'

Test #13:

score: 0
Accepted
time: 3ms
memory: 1212kb

input:

100000
1 -836242278 418121139 779823668 -389911834 456274226 -228137113 -468926922 234463461 -674503678 337251839 -167236416 83618208 217124940 -108562470 83590374 -41795187 888634130 -444317065 -477073058 238536529 -539286006 269643003 593019232 -296509616 983037312 -491518656 -730801390 365400695 ...

output:

+-+++++-+-+-+++++++-+-+++++-+++-+++++++-+++-+++++++++-+++++++-+-+-+++++++++++-+-+-+-+-+-+++-+-+-+-+++-+++-+++-+++++++++++++++++++-+++-+-+-+-+++++++-+++-+-+-+++-+++-+++++++-+-+++++-+-+++-+-+++++-+-+++-+-+++-+-+++++++-+++++++++-+-+++-+++++++-+-+++++++-+-+-+++-+++-+-+++-+-+-+-+++-+-+-+-+-+-+++-+++++++-...

result:

ok single line: '+-+++++-+-+-+++++++-+-+++++-++...++-+++++-+-+-+++++++-+-+-+++++-'

Test #14:

score: 0
Accepted
time: 0ms
memory: 1316kb

input:

10
1 -92 -46 -46 -46 -46 -46 -46 -46 46

output:

+--------+

result:

ok single line: '+--------+'

Test #15:

score: 0
Accepted
time: 0ms
memory: 1212kb

input:

1000
1 -236388 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -118194 -1181...

output:

+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------...

result:

ok single line: '+-----------------------------...------------------------------+'

Test #16:

score: 0
Accepted
time: 3ms
memory: 1240kb

input:

100000
1 -341428024 -170714012 -170714012 -170714012 -170714012 -170714012 -170714012 -170714012 -170714012 -170714012 -170714012 -170714012 -170714012 -170714012 -170714012 -170714012 -170714012 -170714012 -170714012 -170714012 -170714012 -170714012 -170714012 -170714012 -170714012 -170714012 -1707...

output:

+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------...

result:

ok single line: '+-----------------------------...------------------------------+'

Test #17:

score: 0
Accepted
time: 0ms
memory: 1232kb

input:

100000
-480901673 -509307600 -562561206 -720747466 941874932 -338344843 -453928087 355126643 -42193930 344068464 -358448536 132560523 166795837 314061531 487526745 -156787355 611354631 116338982 -466559641 -310495789 -368174169 729138 -202574892 -453653662 -893218259 827601754 128423870 -106094115 7...

output:

----+--+++-+++++++-------+++++---++-+----++++----++++----+++++++++------++-----+++++++++--++++-++++----+-+-++----+++--+-+++--------+-++-++++-------+++++-------------+-++---+-----++--+----+------+-+-++++-+++++-+--+++---+----++++---+++----+-+-+-------++-+-+-----++-++++++-+--++-+-+++-+-++++++--++-----+...

result:

ok single line: '----+--+++-+++++++-------+++++...--++-++-+---+-++---++-++++-++++'

Test #18:

score: 0
Accepted
time: 0ms
memory: 1272kb

input:

100000
401801336 -153873233 -245401319 57736118 -371480661 -7386866 -962876999 -509105223 -97542547 312188284 -825578860 197298463 -215386150 -894478467 184851706 -973780424 -155743919 405442471 -448475678 509920273 119901780 330459500 -494037860 -200311269 791000901 -661046994 634125416 890073378 -...

output:

++-------+-------+-+++--+-++-++++++----------+-+------+--++-++++++++-+++++--++++--+-+++---++-+--++++-++---+--+----+++-+----++++-----+---++-----++-----++++++-++--+-----+++-----++++-++-+-------+-+++-+----+-++--+---+-----++++--++-++++-+++++++++--------------+-+++++++++++-++-+-----++--+--+++++-------+++...

result:

ok single line: '++-------+-------+-+++--+-++-+...+++--+--++++++----+----++++----'

Test #19:

score: 0
Accepted
time: 4ms
memory: 1328kb

input:

100000
-125561068 496528427 123636069 784342199 315163748 28603817 875018886 626662912 680133215 575275399 412323523 210158900 -892535431 -641075550 715201047 209226508 539100445 -138478419 -725359009 -374696372 902945022 417100071 -542411037 347998418 232130268 -392785534 -565205746 -460603926 -584...

output:

-+++++++++++--++++--++-++------++-+-----+-----+----+-+++-----++---+++-++++++++------------+++------+++++--+++-+++--++++-+++-+--------++-------++++-+--------++--+-++--+-+---+-+--+++++-+--+-----+-++-+++++-++++++++++-+-++--+++---++++-----++++++-+-+-+++-++++++--+++++--+--+-+++----------+--+--++++++-----...

result:

ok single line: '-+++++++++++--++++--++-++-----...+++++++++------++---+-+--------'

Test #20:

score: 0
Accepted
time: 2ms
memory: 1308kb

input:

100000
757141941 851962794 440795956 -194084426 -460134759 116472002 366069975 -237568954 -785280815 838362513 -644741390 274896840 725282583 150384453 412526008 -902733855 -227998106 -144342224 -707275045 983776776 -557101528 503740642 -833874006 601340812 -378617867 -714458662 -59504201 483686065 ...

output:

++++--+--+-++++----+-+-+---+----++-+-++++-+++++++++-++--+-+++++-++--++-----++-----+++++-+++++----++-+--+++--++++-++++-+------++-++------+++-+----------++++++++-+++++--+------++-++--+++--++-+-+-++++--++++++++-+-+-----+-----++---+-+-+++++++-+--+--++-++-++--+-++++---+--+--++-+++++----+++---+++---++--++...

result:

ok single line: '++++--+--+-++++----+-+-+---+--...---+++++++-++------------+----+'

Extra Test:

score: 0
Extra Test Passed