QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#663122#2670. Arranging shoesPioneer#100 ✓102ms46396kbC++201.4kb2024-10-21 13:26:252024-10-21 13:26:26

Judging History

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

  • [2024-10-21 13:26:26]
  • 评测
  • 测评结果:100
  • 用时:102ms
  • 内存:46396kb
  • [2024-10-21 13:26:25]
  • 提交

answer

#include "shoes.h"
#include <bits/stdc++.h>

#define sz(s) ((int)s.size())
#define close gg

using namespace std;

const int MAX=3e5+10;

struct segtree{
	int t[4*MAX];
	
	void build(int v,int tl,int tr){
		if(tl==tr){
			t[v]=1;
			return;
		}
		int tm=(tl+tr)/2;
		build(2*v,tl,tm);
		build(2*v+1,tm+1,tr);
		t[v]=t[2*v]+t[2*v+1];
	}

	void update(int v,int tl,int tr,int pos,int x){
		if(tl==tr){
			t[v]+=x;
			return;
		}
		int tm=(tl+tr)/2;
		if(pos<=tm)update(2*v,tl,tm,pos,x);
		else update(2*v+1,tm+1,tr,pos,x);
		t[v]=t[2*v]+t[2*v+1];
	}

	int get(int v,int tl,int tr,int l,int r){
		if(l>r||tl>r||l>tr)return 0;
		if(l<=tl&&tr<=r)return t[v];
		int tm=(tl+tr)/2;
		return get(2*v,tl,tm,l,r)+get(2*v+1,tm+1,tr,l,r);
	}
}t;

set<int> open[MAX],gg[MAX];

long long count_swaps(vector<int> S) {
	int n=sz(S);
	t.build(1,0,n-1);
	for(int i=0;i<n;i++){
		S[i]=-S[i];
		if(S[i]>0)open[S[i]].insert(i);
		else gg[-S[i]].insert(i);
	}
	long long ans=0;
	for(int i=0;i<n;i++){
		if(t.get(1,0,n-1,i,i)==0)continue;
		if(S[i]>0){
			open[S[i]].erase(i);
			int pos=*gg[S[i]].begin();
			gg[S[i]].erase(pos);
			ans+=t.get(1,0,n-1,i+1,pos-1);
			t.update(1,0,n-1,pos,-1);
		}
		else{
			S[i]=-S[i];
			gg[S[i]].erase(i);
			int pos=*open[S[i]].begin();
			open[S[i]].erase(pos);
			ans+=t.get(1,0,n-1,i,pos-1);
			t.update(1,0,n-1,pos,-1);
		}
	}
	return ans;
}

详细

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 3ms
memory: 32800kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
1
-1 1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
0

result:

ok 3 lines

Test #2:

score: 10
Accepted
time: 0ms
memory: 33704kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
1
1 -1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
1

result:

ok 3 lines

Subtask #2:

score: 20
Accepted

Dependency #1:

100%
Accepted

Test #3:

score: 20
Accepted
time: 0ms
memory: 33980kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
-1 -2 2 1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
2

result:

ok 3 lines

Test #4:

score: 20
Accepted
time: 0ms
memory: 33040kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
-2 1 -1 2

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
3

result:

ok 3 lines

Test #5:

score: 20
Accepted
time: 3ms
memory: 32680kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
-2 2 -1 1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
0

result:

ok 3 lines

Test #6:

score: 20
Accepted
time: 0ms
memory: 33380kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
-1 -2 2 1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
2

result:

ok 3 lines

Test #7:

score: 20
Accepted
time: 7ms
memory: 33840kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
-1 2 1 -2

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
2

result:

ok 3 lines

Test #8:

score: 20
Accepted
time: 0ms
memory: 32916kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
2 -2 -1 1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
1

result:

ok 3 lines

Test #9:

score: 20
Accepted
time: 0ms
memory: 32492kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
1 2 -2 -1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
4

result:

ok 3 lines

Test #10:

score: 20
Accepted
time: 0ms
memory: 33240kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
2 -2 1 -1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
2

result:

ok 3 lines

Test #11:

score: 20
Accepted
time: 0ms
memory: 32812kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
1 2 -2 -1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
4

result:

ok 3 lines

Test #12:

score: 20
Accepted
time: 5ms
memory: 32352kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
3
-3 -2 1 2 3 -1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
5

result:

ok 3 lines

Test #13:

score: 20
Accepted
time: 3ms
memory: 32652kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
4
-1 1 -2 2 -4 4 -3 3

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
0

result:

ok 3 lines

Test #14:

score: 20
Accepted
time: 0ms
memory: 33504kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
4
-2 3 -4 -3 -2 2 4 2

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
7

result:

ok 3 lines

Test #15:

score: 20
Accepted
time: 3ms
memory: 32572kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
4
1 2 2 2 -2 -2 -2 -1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
13

result:

ok 3 lines

Test #16:

score: 20
Accepted
time: 3ms
memory: 33604kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
4
4 4 4 4 -4 -4 -4 -4

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
10

result:

ok 3 lines

Test #17:

score: 20
Accepted
time: 0ms
memory: 33336kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
4
2 -2 3 -3 2 -2 3 -3

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
4

result:

ok 3 lines

Test #18:

score: 20
Accepted
time: 3ms
memory: 32076kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
4
1 2 4 2 -4 -1 -2 -2

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
12

result:

ok 3 lines

Test #19:

score: 20
Accepted
time: 0ms
memory: 33376kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
4
2 4 1 3 -2 -4 -1 -3

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
10

result:

ok 3 lines

Test #20:

score: 20
Accepted
time: 0ms
memory: 33792kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
4
2 -1 -1 3 -3 1 1 -2

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
13

result:

ok 3 lines

Test #21:

score: 20
Accepted
time: 3ms
memory: 32768kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
4
-1 -3 -1 -1 1 1 3 1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
7

result:

ok 3 lines

Test #22:

score: 20
Accepted
time: 5ms
memory: 32812kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
4
3 3 1 1 -1 -1 -3 -3

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
14

result:

ok 3 lines

Test #23:

score: 20
Accepted
time: 0ms
memory: 32356kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
4
3 4 1 4 -4 -1 -4 -3

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
13

result:

ok 3 lines

Test #24:

score: 20
Accepted
time: 3ms
memory: 32408kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
6
6 2 -5 -1 3 -3 1 4 -2 -6 5 -4

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
25

result:

ok 3 lines

Test #25:

score: 20
Accepted
time: 0ms
memory: 32976kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
7
-7 5 -7 1 -1 -3 -5 7 7 3 4 -6 6 -4

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
18

result:

ok 3 lines

Test #26:

score: 20
Accepted
time: 3ms
memory: 33524kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
8
-5 5 -3 3 -6 6 -8 8 -4 4 -7 7 -1 1 -2 2

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
0

result:

ok 3 lines

Test #27:

score: 20
Accepted
time: 0ms
memory: 33604kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
8
-6 7 6 -7 3 -1 -5 5 -3 1 3 -4 -3 4 8 -8

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
11

result:

ok 3 lines

Test #28:

score: 20
Accepted
time: 4ms
memory: 33712kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
8
5 2 8 4 5 1 1 3 -3 -1 -1 -5 -4 -8 -2 -5

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
56

result:

ok 3 lines

Test #29:

score: 20
Accepted
time: 4ms
memory: 32076kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
8
8 -8 8 8 -8 -8 8 -8 8 -8 8 8 -8 8 -8 -8

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
11

result:

ok 3 lines

Test #30:

score: 20
Accepted
time: 3ms
memory: 34004kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
8
2 -2 2 -2 2 -2 1 -1 2 -2 2 -2 2 -2 2 -2

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
8

result:

ok 3 lines

Test #31:

score: 20
Accepted
time: 0ms
memory: 33764kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
8
5 5 8 5 5 4 5 8 -8 -5 -5 -5 -4 -8 -5 -5

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
41

result:

ok 3 lines

Test #32:

score: 20
Accepted
time: 3ms
memory: 32232kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
8
7 8 1 2 2 7 7 2 -7 -8 -1 -2 -2 -7 -7 -2

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
36

result:

ok 3 lines

Test #33:

score: 20
Accepted
time: 3ms
memory: 33616kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
8
4 1 -8 8 5 -8 -6 -5 5 6 8 -5 -8 8 -1 -4

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
36

result:

ok 3 lines

Test #34:

score: 20
Accepted
time: 0ms
memory: 32428kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
8
-2 -8 -4 -4 -3 -8 -1 -5 5 1 8 3 4 4 8 2

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
48

result:

ok 3 lines

Test #35:

score: 20
Accepted
time: 0ms
memory: 33144kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
8
1 5 7 5 5 3 6 5 -5 -6 -3 -5 -5 -7 -5 -1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
52

result:

ok 3 lines

Test #36:

score: 20
Accepted
time: 5ms
memory: 32484kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
8
4 3 5 2 4 8 6 2 -2 -6 -8 -4 -2 -5 -3 -4

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
52

result:

ok 3 lines

Subtask #3:

score: 20
Accepted

Test #37:

score: 20
Accepted
time: 0ms
memory: 32612kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
-2 -2 2 2

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
1

result:

ok 3 lines

Test #38:

score: 20
Accepted
time: 0ms
memory: 32756kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
-1 1 -1 1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
0

result:

ok 3 lines

Test #39:

score: 20
Accepted
time: 7ms
memory: 32036kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
-1 1 -1 1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
0

result:

ok 3 lines

Test #40:

score: 20
Accepted
time: 3ms
memory: 33700kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
-2 -2 2 2

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
1

result:

ok 3 lines

Test #41:

score: 20
Accepted
time: 0ms
memory: 32940kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
-1 1 1 -1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
1

result:

ok 3 lines

Test #42:

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

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
2 -2 -2 2

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
1

result:

ok 3 lines

Test #43:

score: 20
Accepted
time: 0ms
memory: 32588kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
1 1 -1 -1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
3

result:

ok 3 lines

Test #44:

score: 20
Accepted
time: 5ms
memory: 33020kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
2 -2 2 -2

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
2

result:

ok 3 lines

Test #45:

score: 20
Accepted
time: 7ms
memory: 32476kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
1 1 -1 -1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
3

result:

ok 3 lines

Test #46:

score: 20
Accepted
time: 0ms
memory: 33672kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
3
2 -2 -2 2 -2 2

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
1

result:

ok 3 lines

Test #47:

score: 20
Accepted
time: 0ms
memory: 33968kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
8
-3 -3 -3 3 -3 -3 -3 3 3 3 3 3 3 3 -3 -3

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
15

result:

ok 3 lines

Test #48:

score: 20
Accepted
time: 3ms
memory: 33616kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
11
5 5 -5 5 5 -5 -5 5 5 -5 5 -5 -5 5 -5 -5 -5 -5 5 5 -5 5

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
19

result:

ok 3 lines

Test #49:

score: 20
Accepted
time: 0ms
memory: 34140kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
43
-35 -35 -35 35 35 -35 -35 -35 35 -35 35 -35 35 35 -35 35 35 -35 -35 35 35 35 -35 -35 -35 35 -35 35 -35 35 35 35 35 35 35 35 -35 35 -35 -35 -35 -35 35 35 35 35 -35 35 -35 35 35 -35 -35 -35 35 35 -35 35 -35 35 35 -35 35 35 35 35 -35 -35 -35 -35 -35 35 -35 -35 -3...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
117

result:

ok 3 lines

Test #50:

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

input:

08f55b3f-c300-4051-a472-59ca2a776178
117
50 -50 -50 -50 50 50 -50 50 -50 -50 50 50 50 50 50 -50 -50 -50 50 -50 50 -50 50 50 50 50 50 50 50 -50 50 50 50 -50 -50 -50 50 50 -50 -50 50 50 50 -50 -50 -50 -50 -50 50 -50 50 -50 -50 50 -50 50 50 50 -50 50 -50 50 50 50 50 50 -50 50 50 -50 50 50 -50 50 -50 -5...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
1000

result:

ok 3 lines

Test #51:

score: 20
Accepted
time: 3ms
memory: 33084kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
304
-44 -44 44 44 44 -44 -44 44 44 44 44 -44 -44 -44 44 -44 44 44 -44 -44 44 44 44 -44 -44 -44 -44 44 -44 44 -44 44 44 -44 -44 -44 44 44 -44 44 44 44 -44 -44 44 44 44 44 44 -44 44 44 -44 -44 -44 44 -44 44 -44 44 -44 -44 -44 -44 -44 -44 -44 44 -44 -44 44 44 -44 -4...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
1711

result:

ok 3 lines

Test #52:

score: 20
Accepted
time: 0ms
memory: 33536kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
999
-636 636 636 -636 636 636 -636 636 -636 636 -636 636 -636 636 -636 636 -636 636 -636 -636 -636 636 636 -636 -636 -636 636 -636 636 -636 -636 -636 -636 636 -636 -636 636 -636 636 636 -636 -636 -636 636 -636 -636 -636 -636 636 636 636 636 636 -636 -636 -636 -63...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
19586

result:

ok 3 lines

Test #53:

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

input:

08f55b3f-c300-4051-a472-59ca2a776178
1001
-498 -498 -498 -498 -498 -498 -498 -498 -498 -498 -498 498 -498 -498 -498 -498 498 -498 -498 -498 498 -498 498 498 498 498 -498 498 -498 498 -498 -498 498 -498 -498 498 -498 498 -498 -498 498 -498 498 498 498 498 -498 -498 -498 498 498 -498 -498 498 -498 -49...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
29174

result:

ok 3 lines

Test #54:

score: 20
Accepted
time: 7ms
memory: 33592kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
9998
-1466 1466 1466 1466 1466 1466 -1466 1466 1466 -1466 1466 1466 1466 1466 -1466 -1466 1466 1466 -1466 1466 -1466 -1466 1466 -1466 1466 -1466 -1466 1466 -1466 1466 -1466 -1466 -1466 -1466 1466 1466 1466 1466 -1466 -1466 -1466 -1466 -1466 -1466 -1466 1466 -1466...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
434563

result:

ok 3 lines

Test #55:

score: 20
Accepted
time: 14ms
memory: 33888kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
10003
-9391 -9391 9391 9391 -9391 -9391 -9391 9391 9391 9391 -9391 -9391 9391 -9391 9391 -9391 -9391 -9391 -9391 9391 -9391 9391 -9391 9391 -9391 -9391 9391 -9391 -9391 9391 9391 9391 9391 -9391 -9391 -9391 -9391 -9391 9391 -9391 -9391 -9391 9391 -9391 -9391 9391...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
662066

result:

ok 3 lines

Test #56:

score: 20
Accepted
time: 85ms
memory: 45392kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
99999
-20650 -20650 20650 20650 -20650 -20650 -20650 20650 20650 20650 -20650 -20650 20650 20650 20650 20650 20650 20650 -20650 20650 20650 -20650 20650 20650 20650 20650 20650 -20650 20650 20650 20650 -20650 -20650 20650 20650 -20650 -20650 20650 20650 20650 206...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
9148558

result:

ok 3 lines

Test #57:

score: 20
Accepted
time: 77ms
memory: 46240kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
-11332 11332 -11332 11332 -11332 11332 -11332 11332 -11332 11332 -11332 11332 -11332 11332 -11332 11332 -11332 11332 -11332 11332 -11332 11332 -11332 11332 -11332 11332 -11332 11332 -11332 11332 -11332 11332 -11332 11332 -11332 11332 -11332 11332 -11332 11...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
0

result:

ok 3 lines

Test #58:

score: 20
Accepted
time: 80ms
memory: 46276kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
26704 -26704 -26704 26704 26704 -26704 26704 -26704 26704 -26704 26704 -26704 26704 -26704 -26704 26704 -26704 26704 -26704 26704 -26704 26704 -26704 26704 26704 -26704 -26704 26704 -26704 -26704 -26704 -26704 26704 26704 -26704 26704 26704 -26704 26704 26...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
1233583

result:

ok 3 lines

Test #59:

score: 20
Accepted
time: 89ms
memory: 45296kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1966 1...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
5000050000

result:

ok 3 lines

Test #60:

score: 20
Accepted
time: 78ms
memory: 45156kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
59471 59471 -59471 -59471 59471 59471 59471 59471 59471 -59471 -59471 -59471 59471 59471 -59471 59471 59471 -59471 59471 -59471 59471 -59471 -59471 -59471 -59471 59471 -59471 59471 -59471 59471 59471 59471 59471 59471 59471 59471 -59471 59471 59471 -59471 ...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
7651686

result:

ok 3 lines

Test #61:

score: 20
Accepted
time: 77ms
memory: 45752kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
3091 -3091 3091 -3091 3091 -3091 3091 -3091 3091 -3091 3091 -3091 3091 -3091 3091 -3091 3091 -3091 3091 -3091 3091 -3091 3091 -3091 3091 -3091 3091 -3091 3091 -3091 3091 -3091 3091 -3091 3091 -3091 3091 -3091 3091 -3091 3091 -3091 3091 -3091 3091 -3091 309...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
100000

result:

ok 3 lines

Test #62:

score: 20
Accepted
time: 91ms
memory: 45752kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 2937...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
5000050000

result:

ok 3 lines

Test #63:

score: 20
Accepted
time: 92ms
memory: 45668kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 2937...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
5000050000

result:

ok 3 lines

Test #64:

score: 20
Accepted
time: 84ms
memory: 46004kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 90155 9015...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
5000050000

result:

ok 3 lines

Test #65:

score: 20
Accepted
time: 88ms
memory: 45340kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
-50400 -50400 50400 -50400 50400 50400 50400 -50400 50400 50400 -50400 -50400 -50400 50400 -50400 -50400 50400 50400 -50400 50400 -50400 -50400 -50400 -50400 50400 -50400 50400 50400 -50400 50400 -50400 50400 50400 -50400 50400 50400 -50400 -50400 50400 50...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
8109181

result:

ok 3 lines

Test #66:

score: 20
Accepted
time: 87ms
memory: 45952kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
-33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -33541 -335...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
4999950000

result:

ok 3 lines

Test #67:

score: 20
Accepted
time: 87ms
memory: 46088kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8038 8...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
5000050000

result:

ok 3 lines

Test #68:

score: 20
Accepted
time: 82ms
memory: 45188kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 13023 1302...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
5000050000

result:

ok 3 lines

Test #69:

score: 20
Accepted
time: 3ms
memory: 33708kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
1
-1 1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
0

result:

ok 3 lines

Test #70:

score: 20
Accepted
time: 3ms
memory: 33812kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
-2 -2 2 2

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
1

result:

ok 3 lines

Test #71:

score: 20
Accepted
time: 87ms
memory: 45700kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
99998
-54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -54585 -5458...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
4999750003

result:

ok 3 lines

Test #72:

score: 20
Accepted
time: 86ms
memory: 45624kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
99999
-30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -30460 -3046...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
4999850001

result:

ok 3 lines

Test #73:

score: 20
Accepted
time: 87ms
memory: 45232kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
-45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -45223 -452...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
4999950000

result:

ok 3 lines

Subtask #4:

score: 15
Accepted

Test #74:

score: 15
Accepted
time: 4ms
memory: 33916kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
1
-1 1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
0

result:

ok 3 lines

Test #75:

score: 15
Accepted
time: 0ms
memory: 32792kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
-1 -2 1 2

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
1

result:

ok 3 lines

Test #76:

score: 15
Accepted
time: 0ms
memory: 33740kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
-2 -1 2 1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
1

result:

ok 3 lines

Test #77:

score: 15
Accepted
time: 0ms
memory: 33540kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
2
-1 -1 1 1

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
1

result:

ok 3 lines

Test #78:

score: 15
Accepted
time: 59ms
memory: 45404kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
99998
-93375 -85998 -57472 -57320 -92144 -31526 -99604 -77181 -65443 -97629 -29716 -1904 -93293 -41761 -55949 -50927 -80082 -21357 -51929 -54 -33477 -36300 -49484 -70830 -98314 -40123 -79568 -89806 -90528 -51711 -49394 -2023 -42435 -61625 -61156 -82943 -47590 -69...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
4999750003

result:

ok 3 lines

Test #79:

score: 15
Accepted
time: 85ms
memory: 44504kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
99998
-64484 -91038 -41308 -72712 -1564 -32642 -74991 -79372 -45318 -52023 -67151 -54049 -15705 -93770 -50858 -870 -77097 -19597 -37947 -54404 -36480 -50724 -53983 -59165 -98143 -39237 -2885 -32028 -44812 -25799 -96194 -55733 -39060 -13916 -50000 -79991 -2581 -10...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
4999750003

result:

ok 3 lines

Test #80:

score: 15
Accepted
time: 62ms
memory: 46396kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
99999
-36895 -21252 -33272 -64005 -86598 -9597 -5512 -30508 -26724 -96513 -20778 -45208 -17858 -62202 -26096 -327 -58206 -18274 -97082 -70650 -96288 -97762 -77475 -40197 -33023 -89009 -73569 -12157 -57905 -50207 -78508 -26168 -35060 -45556 -93784 -78602 -5052 -22...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
4999850001

result:

ok 3 lines

Test #81:

score: 15
Accepted
time: 70ms
memory: 45076kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
99999
-36659 -36659 -36659 -62235 -62235 -91177 -91177 -91177 -36659 -36659 -91177 -36659 -36659 -36659 -36659 -91177 -36659 -91177 -62235 -62235 -36659 -36659 -36659 -91177 -62235 -91177 -62235 -62235 -62235 -36659 -91177 -36659 -36659 -36659 -91177 -62235 -3665...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
4999850001

result:

ok 3 lines

Test #82:

score: 15
Accepted
time: 60ms
memory: 45932kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
-4281 -88522 -73487 -80899 -25596 -23936 -5985 -80611 -91620 -63357 -2064 -5363 -5917 -83932 -25745 -67340 -51599 -48609 -50123 -28748 -14761 -68746 -22980 -35585 -29712 -89969 -30212 -84883 -7751 -2359 -22767 -84996 -42365 -23762 -94042 -88836 -54106 -755...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
4999950000

result:

ok 3 lines

Test #83:

score: 15
Accepted
time: 64ms
memory: 44404kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
-82132 -5681 -82990 -92746 -50800 -22168 -28188 -80457 -35022 -36303 -88257 -92502 -8705 -42712 -42152 -43002 -73712 -86254 -26337 -27675 -16197 -24533 -39542 -29082 -28230 -91472 -50450 -72792 -26143 -17635 -56968 -42956 -60262 -77887 -73872 -72632 -56028...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
4999950000

result:

ok 3 lines

Subtask #5:

score: 20
Accepted

Dependency #2:

100%
Accepted

Test #84:

score: 20
Accepted
time: 0ms
memory: 33368kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
11
-1 -3 -5 3 11 10 2 4 -2 -11 -10 -4 9 -9 -6 11 5 1 -8 -11 8 6

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
48

result:

ok 3 lines

Test #85:

score: 20
Accepted
time: 3ms
memory: 32584kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
43
-41 -36 30 16 38 31 2 19 -17 -2 11 -23 34 -19 25 -11 23 29 7 -20 -43 -1 9 -14 -30 17 -38 -28 28 -4 -12 13 -16 -18 1 21 -39 -34 -31 -35 33 -3 18 12 20 -9 26 -27 -26 5 -6 -33 -37 39 -24 36 -40 -25 41 40 -42 3 -29 32 -15 8 35 14 24 10 -10 -22 6 -7 42 4 -13 22 -32...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
748

result:

ok 3 lines

Test #86:

score: 20
Accepted
time: 3ms
memory: 33284kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
117
-102 50 1 42 -56 104 47 18 -29 15 -100 52 54 14 40 -11 -21 -2 102 67 -27 -42 94 -24 -1 -95 72 -115 -16 101 -69 -103 -25 -71 24 41 117 82 19 -81 23 -31 -46 105 -35 -94 -13 -32 -110 -9 36 12 -47 43 62 77 -113 -70 46 81 32 89 116 -57 -48 10 -55 -60 59 -66 38 113...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
6364

result:

ok 3 lines

Test #87:

score: 20
Accepted
time: 0ms
memory: 33560kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
304
-253 187 15 29 -151 303 174 -29 -18 184 -157 145 -67 -109 -270 -172 -222 265 211 156 91 -9 25 -133 -166 -290 227 -294 31 -189 141 151 255 -187 161 -94 94 70 -135 279 -106 168 50 154 64 -270 -69 -83 165 -170 -154 62 278 -45 -259 -224 145 50 -251 238 164 33 -26...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
40471

result:

ok 3 lines

Test #88:

score: 20
Accepted
time: 5ms
memory: 34100kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
999
-756 815 -883 643 -7 685 735 -124 691 388 -838 681 -390 -640 602 -607 -59 54 386 -68 -564 463 -125 -323 -668 875 424 147 940 -62 620 -769 -959 677 826 953 931 171 -657 -15 -272 456 -235 780 -856 885 -936 -994 -546 -677 -622 -20 -954 86 -528 684 180 975 -175 -...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
505420

result:

ok 3 lines

Test #89:

score: 20
Accepted
time: 5ms
memory: 32192kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
1000
-781 781 -172 172 -358 358 -731 731 -755 755 -916 916 -57 57 -949 949 -354 354 -984 984 -649 649 -749 749 -403 403 -776 776 -797 797 -597 597 -97 97 -499 499 -170 170 -598 598 -117 117 -706 706 -156 156 -897 897 -513 513 -877 877 -198 198 -786 786 -190 190 -...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
0

result:

ok 3 lines

Test #90:

score: 20
Accepted
time: 0ms
memory: 33272kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
1000
-467 -303 467 303 -194 194 -337 -697 697 212 -212 337 37 -37 -854 854 442 -442 488 165 -165 -698 -548 698 761 911 548 -761 -911 -488 292 360 -292 -360 -210 210 412 -412 -690 690 615 777 -615 -672 772 860 -772 -860 672 98 -98 789 -777 -879 879 -789 763 989 -7...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
50139

result:

ok 3 lines

Test #91:

score: 20
Accepted
time: 5ms
memory: 32696kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
1000
482 646 33 633 908 983 220 499 756 906 916 569 968 505 612 748 476 771 451 981 405 295 242 567 55 467 727 353 450 714 214 678 453 588 263 830 266 379 670 300 640 957 465 64 739 889 858 576 931 352 729 134 485 519 464 559 924 660 843 585 969 439 524 211 485 7...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
851849

result:

ok 3 lines

Test #92:

score: 20
Accepted
time: 8ms
memory: 33040kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
1000
596 -596 65 124 104 821 -821 764 -764 -104 -124 493 311 -311 761 848 759 312 986 -986 214 66 -66 -214 -312 -759 742 954 726 37 -37 -726 125 -125 48 879 -879 333 -333 -48 -954 -742 -848 729 -729 -761 -493 203 -203 -65 420 -420 152 -152 691 -691 149 196 770 -7...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
42016

result:

ok 3 lines

Test #93:

score: 20
Accepted
time: 0ms
memory: 32740kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
1000
320 -320 476 -476 776 -776 864 -864 182 -182 519 -519 279 -279 316 -316 557 -557 287 -287 803 -803 95 -95 876 -876 13 -13 675 -675 762 -762 607 -607 596 -596 881 -881 601 -601 312 -312 102 -102 236 -236 883 -883 900 -900 740 -740 868 -868 1 -1 433 -433 510 -...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
1000

result:

ok 3 lines

Test #94:

score: 20
Accepted
time: 0ms
memory: 33392kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
1000
282 858 10 431 93 451 831 768 325 46 246 968 895 43 423 34 923 474 667 139 11 32 74 230 482 795 289 245 380 817 922 553 526 542 38 865 424 291 679 849 525 141 799 76 932 43 128 208 266 609 466 631 939 478 361 451 70 152 993 545 476 249 681 585 960 98 621 152...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
677826

result:

ok 3 lines

Test #95:

score: 20
Accepted
time: 0ms
memory: 32276kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
1000
656 841 638 497 592 553 396 730 298 703 53 969 217 74 167 574 383 507 471 547 568 373 180 553 497 616 862 612 129 840 168 477 558 981 308 862 198 179 822 168 969 403 209 612 633 791 471 200 903 598 733 591 882 365 841 593 789 731 758 82 903 173 985 600 146 2...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
500500

result:

ok 3 lines

Test #96:

score: 20
Accepted
time: 4ms
memory: 33864kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
1000
901 145 844 251 826 -571 833 813 564 -707 -972 191 975 -159 -195 440 930 291 -401 985 846 617 -926 -186 354 809 733 470 -251 733 186 861 835 850 -707 -243 222 557 -362 356 5 957 733 218 171 351 -733 -837 972 -972 88 -46 -801 -552 975 901 898 -939 -362 -11 -1...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
311826

result:

ok 3 lines

Test #97:

score: 20
Accepted
time: 4ms
memory: 32372kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
1000
-997 -739 -997 -189 -997 -203 -203 -189 -997 -739 -997 -544 -997 -997 -997 -997 -189 -431 -189 -997 -997 -997 -822 -203 -189 -997 -997 -997 -739 -822 -739 -997 -544 -743 -203 -997 -189 -203 -203 -203 -997 -997 -203 -997 -997 -997 -189 -739 -203 -997 -739 -18...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
528922

result:

ok 3 lines

Test #98:

score: 20
Accepted
time: 0ms
memory: 32420kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
1000
199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 19...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
500500

result:

ok 3 lines

Test #99:

score: 20
Accepted
time: 0ms
memory: 33152kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
1000
917 531 200 739 477 766 234 243 816 755 74 625 132 342 432 83 930 304 330 616 230 614 532 58 822 398 977 205 929 935 194 791 329 897 378 426 33 4 109 222 161 602 164 474 369 270 923 801 502 663 98 344 856 707 753 945 155 444 455 82 561 254 762 772 415 168 73...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
1000000

result:

ok 3 lines

Subtask #6:

score: 15
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Dependency #5:

100%
Accepted

Test #100:

score: 15
Accepted
time: 8ms
memory: 34016kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
1001
763 -461 594 -507 -651 -210 278 466 -770 572 442 -456 -181 517 -294 984 853 -478 89 -192 -425 -440 95 584 -457 809 -188 821 -783 229 -868 -702 544 -453 -352 565 527 657 -356 83 938 54 275 -80 640 982 425 -626 788 -515 837 -975 -454 -504 114 291 532 -744 246 ...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
506979

result:

ok 3 lines

Test #101:

score: 15
Accepted
time: 9ms
memory: 33640kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
9998
-1462 4530 -6377 -5342 3598 -583 -5965 592 -3331 -4262 7341 -9775 -4137 -2000 7805 -451 -6102 172 -7142 -698 -6657 9002 -7058 -6342 3252 342 2237 -5069 8015 7464 -1097 -8866 5169 -2291 -5620 -2030 893 1106 -6308 9276 -7688 -4314 -6421 -1496 -2566 1963 -2455 ...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
48116887

result:

ok 3 lines

Test #102:

score: 15
Accepted
time: 7ms
memory: 34148kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
10003
5921 -3845 -3390 5465 5496 6232 -3082 6104 -3928 -3201 -5089 -6143 5628 862 -5334 -7964 7377 -8102 -6390 1030 -8905 -7947 -6427 6912 -8084 2201 1348 -4981 -1914 -5237 7435 -6615 -6912 -1783 9805 5319 -1516 7258 -4596 -7499 113 506 -9836 -5174 8482 3930 -549...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
24892640

result:

ok 3 lines

Test #103:

score: 15
Accepted
time: 86ms
memory: 44664kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
99999
11158 -31618 40242 -56723 -81546 -3473 25047 30209 19214 97703 28126 85203 -75856 -2536 17353 36380 -87240 47739 18438 4001 -41893 -17695 60976 -84386 -25850 -95935 -26636 99171 29296 -38497 -20961 17129 52307 25917 63399 -1704 81677 -86713 -25279 48135 -56...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
5008868979

result:

ok 3 lines

Test #104:

score: 15
Accepted
time: 42ms
memory: 46244kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
-91355 91355 -51363 51363 -41950 41950 -29316 29316 -29220 29220 -87708 87708 -37160 37160 -99118 99118 -30923 30923 -89410 89410 -41940 41940 -78830 78830 -46818 46818 -69378 69378 -15464 15464 -22805 22805 -63312 63312 -91851 91851 -40607 40607 -46727 46...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
0

result:

ok 3 lines

Test #105:

score: 15
Accepted
time: 75ms
memory: 45128kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
-81324 81324 -87957 87957 14170 -14170 88816 -17290 17290 -88816 -67007 17141 -17141 68860 -51359 67007 82771 -80925 51359 80925 70041 -82771 -68860 -70041 -94436 60386 96911 92907 -8271 -96911 -2369 94436 -97649 64654 -92907 2369 -6233 6233 8271 -92261 92...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
46252151

result:

ok 3 lines

Test #106:

score: 15
Accepted
time: 65ms
memory: 45232kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
4741 55393 50296 10498 79626 98360 94431 17043 34922 54834 99143 82858 4671 1562 3169 73158 68137 47988 7589 15928 2885 22 73375 71846 97963 6835 59857 49814 32372 87855 73219 96294 93860 9573 36864 93317 22558 99841 79292 73672 88447 12563 96205 88081 616...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
9999963921

result:

ok 3 lines

Test #107:

score: 15
Accepted
time: 84ms
memory: 45492kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
24417 12649 16566 24590 18329 77754 48936 35416 58795 40775 -40775 89037 62940 -62940 -89037 84816 -84816 -58795 -35416 -48936 -77754 -18329 -24590 71239 -71239 77868 -77868 -16566 36211 -36211 -12649 -24417 53427 -53427 55955 81103 -81103 9136 98221 82404...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
97035863

result:

ok 3 lines

Test #108:

score: 15
Accepted
time: 63ms
memory: 45712kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
24684 -24684 73507 -73507 3492 -3492 10881 -10881 25503 -25503 89495 -89495 72186 -72186 18929 -18929 36658 -36658 25817 -25817 39307 -39307 24371 -24371 28982 -28982 22420 -22420 1984 -1984 4545 -4545 24903 -24903 6743 -6743 18837 -18837 77463 -77463 3372...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
100000

result:

ok 3 lines

Test #109:

score: 15
Accepted
time: 76ms
memory: 44728kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
85707 85707 85707 85707 85707 85707 85707 85707 85707 74009 85707 74009 85707 74009 74009 74009 85707 85707 85707 85707 85707 74009 74009 85707 85707 85707 85707 85707 85707 85707 85707 85707 74009 85707 85707 85707 74009 85707 85707 85707 85707 85707 7400...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
5004045831

result:

ok 3 lines

Test #110:

score: 15
Accepted
time: 92ms
memory: 45224kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 29373 2937...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
5000050000

result:

ok 3 lines

Test #111:

score: 15
Accepted
time: 62ms
memory: 44504kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
34226 45612 67634 50017 72658 56730 14022 93164 92263 54501 56428 48797 70762 74853 71979 34561 1939 21759 10949 6206 86437 88773 4127 10528 50637 55411 40057 90711 23213 58125 18781 52095 55730 95059 38070 96011 71563 36522 22921 91537 20820 43774 75244 1...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
5000050000

result:

ok 3 lines

Test #112:

score: 15
Accepted
time: 76ms
memory: 46280kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
-43993 -31150 26139 80543 80832 -25608 -35921 18740 73269 -90344 68769 48684 -94494 32954 35040 57779 41421 -94151 34128 28992 -93964 67798 -55515 47280 -37328 81832 10694 -38244 -8241 20605 -87703 41202 31118 -39949 73514 63399 -70871 -99326 -4117 -70115 ...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
7385336477

result:

ok 3 lines

Test #113:

score: 15
Accepted
time: 102ms
memory: 45936kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
-97253 -71576 -92123 -11988 -13949 -61267 -21617 -83629 -48428 -50795 -90115 -5144 -49859 -2310 -27924 -10380 -41827 -33610 -48053 -12783 -41840 -52964 -96282 -17577 -96936 -77985 -38343 -80533 -8451 -7500 -54255 -44229 -29217 -51222 -61161 -40538 -64634 -...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
6222261399

result:

ok 3 lines

Test #114:

score: 15
Accepted
time: 63ms
memory: 44612kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
62595 15981 77846 11426 59952 71688 72303 58428 86576 37906 48451 87320 18265 37586 99003 10775 98005 65172 49847 32752 8329 68558 42383 64245 36412 85908 59385 14180 5155 2930 60523 46148 90137 8438 56390 8178 14113 85041 65254 5620 35368 35321 79908 4156...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
10000000000

result:

ok 3 lines

Test #115:

score: 15
Accepted
time: 65ms
memory: 46088kb

input:

08f55b3f-c300-4051-a472-59ca2a776178
100000
21300 11799 95357 23943 95760 77365 26645 70409 13734 27370 93856 48677 39092 76118 76785 86876 13207 19700 98931 76223 98399 2482 48560 30499 5018 49138 24196 6704 76320 40813 54913 58761 935 8112 74791 69822 87526 32561 85120 89920 63421 70796 29267 3684...

output:

9ce55564-5404-428a-8d2e-0d809c85101e
OK
10000000000

result:

ok 3 lines

Extra Test:

score: 0
Extra Test Passed