QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#479285#4739. Pionektjsyykkk100 ✓221ms15476kbC++111.1kb2024-07-15 16:14:302024-07-15 16:14:30

Judging History

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

  • [2024-07-15 16:14:30]
  • 评测
  • 测评结果:100
  • 用时:221ms
  • 内存:15476kb
  • [2024-07-15 16:14:30]
  • 提交

answer

#include<bits/stdc++.h>
#define int long long
using namespace std;
int n,ans;
const double pi=3.14159;
struct vec{
	int x,y;double a;
	vec friend operator+(vec a,vec b){
		return {a.x+b.x,a.y+b.y};
	}
	vec friend operator-(vec a,vec b){
		return {a.x-b.x,a.y-b.y};
	}
	int norm(){
		return x*x+y*y;
	}
	int det(vec b){
		return x*b.y-y*b.x;
	}
	int dot(vec b){
		return x*b.x+y*b.y;
	}
	int id(){
		if(x>=0)return y>=0?1:4;
		return y>=0?2:3;
	}
	double angle(){
		return atan2(y,x);
	}
}v[600005];
bool cmp(vec a,vec b){
	return a.angle()<b.angle();
}
signed main(){
	scanf("%lld",&n);
	for(int i=1;i<=n;i++)scanf("%lld%lld",&v[i].x,&v[i].y);
	sort(v+1,v+n+1,cmp);
	for(int i=1;i<=n;i++)v[i+n]=v[i],ans=max(ans,v[i].norm()),v[i].a=v[i].angle(),v[i+n].a=v[i].a+pi*2;//cout<<v[i].x<<" "<<v[i].y<<" "<<v[i].a<<endl;
	vec now=v[0];
	for(int l=1,r=0;l<=n;l++){
		now=now-v[l-1];ans=max(ans,now.norm());
		while(r+1<l+n&&v[r+1].a-v[l].a<pi)now=now+v[++r],ans=max(ans,now.norm());
		//cout<<l<<" "<<r<<" "<<now.norm()<<endl;
	}
	printf("%lld",ans);
}

详细

Subtask #1:

score: 15
Accepted

Test #1:

score: 15
Accepted
time: 1ms
memory: 4328kb

input:

5
2 -2
-2 -2
0 2
3 1
-3 1

output:

26

result:

ok 1 number(s): "26"

Test #2:

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

input:

1
-2 3

output:

13

result:

ok 1 number(s): "13"

Test #3:

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

input:

20
-3 -8
-5 -5
-4 2
4 -4
-5 -4
-8 9
-4 1
-2 -3
2 0
-2 -10
-7 7
4 3
-7 2
-5 -3
-9 -9
1 6
7 -9
-8 8
7 -9
10 -2

output:

4930

result:

ok 1 number(s): "4930"

Test #4:

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

input:

20
10 6
-9 7
-5 5
10 -10
6 9
0 9
5 8
8 4
7 -9
4 -4
-7 10
-8 -8
-2 -3
-8 -6
7 2
10 -1
-5 9
-6 8
3 -8
-4 1

output:

6084

result:

ok 1 number(s): "6084"

Test #5:

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

input:

15
-7 -4
8 -6
-6 -10
-10 8
-2 2
4 -8
-3 -2
-6 -10
6 -2
-8 -2
2 -9
2 3
4 8
5 -3
-10 5

output:

3161

result:

ok 1 number(s): "3161"

Test #6:

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

input:

17
3 6
7 6
-2 -3
0 6
9 -10
7 10
10 6
1 -6
6 10
-2 0
-2 10
7 -7
5 0
-2 -2
5 -10
10 8
-10 0

output:

5960

result:

ok 1 number(s): "5960"

Test #7:

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

input:

20
5 3
6 3
2 -1
10 4
5 3
9 3
3 0
9 5
4 1
3 2
4 1
7 3
10 5
7 2
1 -1
7 4
8 2
7 4
5 3
8 4

output:

16900

result:

ok 1 number(s): "16900"

Test #8:

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

input:

20
-10 0
-9 -7
-10 -9
-5 -1
-3 -1
-4 -3
-1 -1
-6 -4
-2 0
-2 -1
-3 0
-8 -8
-1 1
-7 -6
-8 -5
-10 1
-1 1
-5 -2
-1 -1
-8 -8

output:

13732

result:

ok 1 number(s): "13732"

Test #9:

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

input:

18
-4 -1
-3 -2
-4 -2
-2 -1
-2 -6
-2 -5
-4 -3
-2 -3
-2 -4
-3 -4
-2 -2
-4 -5
-3 -1
-4 -4
-3 -5
-4 -6
-3 -3
-3 -6

output:

6885

result:

ok 1 number(s): "6885"

Test #10:

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

input:

10
20 20
20 20
-3 1
6 7
-7 7
-8 1
-8 -4
3 8
-11 0
7 7

output:

7162

result:

ok 1 number(s): "7162"

Test #11:

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

input:

2
5 1
-3 1

output:

26

result:

ok 1 number(s): "26"

Test #12:

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

input:

5
0 0
1 0
0 -1
-1 0
0 1

output:

2

result:

ok 1 number(s): "2"

Test #13:

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

input:

1
0 0

output:

0

result:

ok 1 number(s): "0"

Test #14:

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

input:

20
-9693 -7744
2520 1026
-5879 849
-8041 3096
-1545 3561
-5868 -2837
-7782 3883
4796 -5969
-9985 8487
-3980 -2196
-5221 2690
-1276 -4804
-9865 4738
-1731 7643
3532 3744
-1098 5673
7946 -3322
5394 -4151
7731 -1245
-6815 5955

output:

7149019813

result:

ok 1 number(s): "7149019813"

Test #15:

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

input:

20
-71 -89
2 -80
-52 -67
29 -75
-11 -81
-84 -70
-6 19
-66 -39
26 -29
0 0
-24 -99
-41 -46
-24 -67
17 -100
12 -21
-7 -8
-70 -3
-59 -86
-2 -76
-31 -25

output:

1333657

result:

ok 1 number(s): "1333657"

Test #16:

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

input:

19
650 -8506
5441 7585
931 8335
4514 3241
0 0
-3047 -4121
9780 -9197
-4941 3027
9856 6796
1999 9834
-9399 9246
-9171 635
-5135 5138
7869 -6754
6393 6129
4990 -8773
-4369 -9981
-7943 1326
9654 6069

output:

4650151969

result:

ok 1 number(s): "4650151969"

Test #17:

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

input:

19
5850 -1938
6990 5919
-6253 -8379
3481 7134
356 -6789
9091 9279
8230 4407
7409 -8505
-8684 6824
5249 4317
-2452 -5027
-5099 3504
4142 6760
2901 9666
7915 5044
9202 -2769
-9593 -755
-9187 8379
0 0

output:

6510202196

result:

ok 1 number(s): "6510202196"

Test #18:

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

input:

19
-5066 -9258
5746 -7684
4216 -6255
8142 9502
1002 4743
-3557 -9283
2173 -3183
9877 9564
6591 9663
1149 -5284
0 0
4163 8825
-4052 9908
-680 2365
1766 -6213
-9265 -1428
-2219 -1030
1308 2861
3039 4899

output:

4748801000

result:

ok 1 number(s): "4748801000"

Test #19:

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

input:

19
801 73
-6234 5916
-9633 -2691
-7037 6320
4555 -3858
-6419 -285
2222 7073
6166 -2174
9978 -8897
1856 1687
8222 2436
-3386 2352
-8397 -9699
8530 -1454
4091 -4421
0 0
8103 -5564
-603 -3953
-4963 -7065

output:

3355302226

result:

ok 1 number(s): "3355302226"

Test #20:

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

input:

20
-6606 -6602
6368 6365
-4248 -4247
686 684
-5865 -5863
-2622 -2621
0 0
-9157 -9152
-6998 -6994
-7445 -7441
6561 6558
1067 1067
7826 7821
-3575 -3573
2718 2716
8578 8574
-5980 -5976
-3649 -3647
9287 9283
8798 8794

output:

6301266481

result:

ok 1 number(s): "6301266481"

Test #21:

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

input:

6
7 -7
8 -5
8 -6
7 -5
8 -7
7 -6

output:

3321

result:

ok 1 number(s): "3321"

Test #22:

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

input:

4
0 0
2 -5
2 3
1 1

output:

29

result:

ok 1 number(s): "29"

Test #23:

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

input:

6
0 -1
0 -3
3 4
4 3
5 -5
4 1

output:

265

result:

ok 1 number(s): "265"

Subtask #2:

score: 45
Accepted

Dependency #1:

100%
Accepted

Test #24:

score: 45
Accepted
time: 0ms
memory: 4296kb

input:

100
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
2 1
2 2
2 3
2 4
2 5
2 6
2 7
2 8
2 9
2 10
3 1
3 2
3 3
3 4
3 5
3 6
3 7
3 8
3 9
3 10
4 1
4 2
4 3
4 4
4 5
4 6
4 7
4 8
4 9
4 10
5 1
5 2
5 3
5 4
5 5
5 6
5 7
5 8
5 9
5 10
6 1
6 2
6 3
6 4
6 5
6 6
6 7
6 8
6 9
6 10
7 1
7 2
7 3
7 4
7 5
7 6
7 7
7 8
7 9
7 10
8 1
8 2
8...

output:

605000

result:

ok 1 number(s): "605000"

Test #25:

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

input:

1800
43 -4
53 -33
84 -45
-11 74
-59 8
-58 66
-42 44
97 -83
-33 14
-97 -1
57 -14
-91 62
91 47
-66 42
83 67
23 58
-31 -90
-34 26
-20 -18
23 48
-25 -76
-86 78
89 -79
63 67
88 31
80 31
-100 -95
-11 18
88 73
31 -92
-46 -92
-49 19
-5 78
3 -92
-47 -84
-10 -9
-5 -98
48 24
38 -32
51 39
7 -76
49 60
-30 -80
-3...

output:

2208800493

result:

ok 1 number(s): "2208800493"

Test #26:

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

input:

1762
-91 -78
-72 -66
-57 -87
89 8
9 -85
-53 27
-11 -14
-22 2
-79 -27
-29 26
-86 95
-98 97
89 11
-59 -48
76 -41
80 -12
-87 23
87 5
-97 37
-58 69
-48 80
-53 -20
59 -92
-49 25
-4 -91
60 -39
-69 96
42 -33
53 29
-32 -2
86 52
78 -47
-46 -63
-16 -52
33 -46
64 68
-14 100
0 -20
-37 76
-69 -33
63 -9
4 33
-98 ...

output:

2001099698

result:

ok 1 number(s): "2001099698"

Test #27:

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

input:

2000
87 85
75 72
37 36
75 72
72 70
42 42
12 11
74 71
20 20
81 78
63 59
13 11
81 77
22 22
15 14
69 68
99 94
63 62
10 10
45 44
83 80
83 81
41 38
34 32
33 33
84 82
93 91
4 2
50 49
54 52
40 38
38 37
4 3
52 49
37 34
38 37
46 43
82 79
91 88
70 69
75 72
31 29
30 28
95 92
43 43
52 49
4 3
77 76
53 50
53 51
2...

output:

19974230644

result:

ok 1 number(s): "19974230644"

Test #28:

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

input:

1999
-77 69
-68 31
-97 39
-87 83
-98 91
-53 26
-33 15
-97 94
-96 93
-42 41
-64 53
-59 21
-31 16
-63 3
-75 67
-98 73
-82 67
-85 22
-70 69
-74 68
-65 41
-37 28
-43 37
-43 29
-64 54
-32 19
-88 48
-93 5
-43 29
-51 44
-48 40
-66 8
-72 43
-64 61
-84 63
-43 35
-59 42
-84 82
-81 77
-48 18
-41 17
-59 45
-93 ...

output:

23546558845

result:

ok 1 number(s): "23546558845"

Test #29:

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

input:

1913
43 65
17 59
57 70
-14 65
-8 57
9 68
-10 -8
59 51
22 60
38 70
-20 60
0 58
-22 69
32 54
32 70
38 68
-8 59
21 63
21 54
53 67
-11 62
-7 68
48 59
1 55
3 55
-26 70
29 68
-2 65
12 63
47 50
-2 51
57 64
50 55
-25 51
21 59
45 52
50 64
33 67
42 52
27 50
2 55
18 55
49 68
-29 58
35 55
30 64
-22 56
31 54
33 ...

output:

13968597825

result:

ok 1 number(s): "13968597825"

Test #30:

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

input:

1923
-29 -19
30 31
-18 -27
-11 -15
24 30
25 33
-17 -20
33 26
11 37
33 33
-40 -37
-22 -38
38 30
-10 -19
35 13
-27 -15
-26 -14
-34 -40
23 37
20 12
-28 -31
31 28
-37 -36
16 35
-31 -16
40 32
-23 -32
38 40
-22 -19
35 36
39 27
-37 -28
-31 -19
38 22
-22 -37
-12 -35
-35 -36
32 22
-40 -13
-37 -14
27 32
-33 -...

output:

1154449301

result:

ok 1 number(s): "1154449301"

Test #31:

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

input:

2000
-7263 -1790
4528 7404
3634 -4023
-4757 3704
4762 2327
99 -4374
4163 -885
-2052 1370
-2170 -6562
1921 2791
-5534 -4559
260 -2548
7628 -892
-5388 -1507
-2133 5327
7354 8024
4767 -5713
88 -1907
-8877 6476
-4092 -8573
-139 -7680
1633 -4106
-6124 6289
-9602 -3439
6565 -97
-1100 5026
8555 -1345
-8859...

output:

27144025058069

result:

ok 1 number(s): "27144025058069"

Test #32:

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

input:

1985
7392 1866
2970 7232
4981 -9677
3037 9859
-5942 -6496
3642 -752
9289 -510
-6372 -8859
-1217 -4404
4251 -483
-3515 -7608
317 3362
-830 -2607
9554 2788
9080 664
-2756 2700
-594 5955
-4061 3968
-681 -4284
-756 8088
-3428 -6202
9862 -166
-1085 8903
-4924 -7184
6606 -6003
-3293 -5152
2909 782
-4132 -...

output:

25861209848708

result:

ok 1 number(s): "25861209848708"

Test #33:

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

input:

2000
-8910 -6773
7147 -8669
-7888 -3954
6551 -3519
-2583 -2388
824 2723
7484 8632
-7212 -2279
-267 -3730
-1297 8007
5095 -1715
-2600 -9996
-8203 -1259
-4741 1612
-8475 -8434
3984 839
8658 -3314
1111 -837
-8936 4844
3252 -3125
-8781 5443
-7659 -2616
-8006 4713
4897 -2047
-9074 9061
-7722 8756
-4977 2...

output:

27431726000621

result:

ok 1 number(s): "27431726000621"

Test #34:

score: 0
Accepted
time: 1ms
memory: 4268kb

input:

1000
1710 1710
-9553 -9549
-399 -398
-277 -275
5744 5741
-3969 -3967
-3452 -3449
1933 1931
-8679 -8674
2686 2684
-6406 -6403
1785 1785
4489 4486
5674 5672
-4164 -4161
4511 4509
-3638 -3636
-2311 -2310
2441 2439
-4064 -4063
5657 5654
-5787 -5783
-887 -885
1388 1387
7179 7174
-617 -617
-4534 -4531
-78...

output:

15013085866146

result:

ok 1 number(s): "15013085866146"

Test #35:

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

input:

2000
7830 1554
-885 -860
-2287 -454
-499 -100
-4977 -989
-9629 -9376
-532 -104
8432 8210
4862 966
-4507 -894
-6253 -1241
-8374 -1663
-319 -64
-7094 -6907
-4486 -890
-7908 -1571
1345 267
3137 3055
7174 1426
-6465 -1285
-5956 -1184
-9209 -8969
-2849 -565
7476 7280
6551 1301
6531 1297
2716 2645
-7175 -...

output:

35226796060250

result:

ok 1 number(s): "35226796060250"

Test #36:

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

input:

1922
6 -8
-1 -7
10 -9
4 -4
-1 -13
-7 1
-19 -15
-9 9
-11 7
2 17
-3 1
7 -4
5 -3
5 9
-11 -5
7 -2
-16 7
3 7
-4 -7
14 -2
20 13
-7 8
1 2
-7 16
-10 12
-5 -4
0 19
-14 -14
-10 -11
13 -5
-4 -8
9 4
5 -8
-4 1
-7 -3
8 1
-18 -2
18 -8
12 4
18 0
1 -15
4 7
-14 -15
10 5
-5 -8
10 -6
20 -10
10 13
10 12
-11 -17
5 0
1 -8...

output:

80542250

result:

ok 1 number(s): "80542250"

Test #37:

score: 0
Accepted
time: 1ms
memory: 4268kb

input:

961
-55 -41
-66 -51
-66 -46
-50 -70
-41 -41
-58 -55
-43 -50
-61 -47
-40 -64
-67 -43
-41 -59
-64 -50
-43 -44
-48 -50
-68 -55
-58 -58
-60 -69
-57 -51
-69 -45
-56 -70
-54 -44
-67 -51
-50 -66
-57 -68
-44 -51
-69 -52
-61 -62
-45 -42
-66 -53
-42 -69
-55 -70
-61 -45
-66 -70
-67 -62
-52 -61
-53 -40
-68 -46
...

output:

5587302050

result:

ok 1 number(s): "5587302050"

Test #38:

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

input:

200
2468 -7771
-1212 -3381
-6073 -6467
-6616 6247
2337 1904
-2150 3791
6494 -6895
7888 4171
-5095 -1879
-9803 -7632
-7918 5835
6868 6981
6883 -9966
8028 -7094
-6818 5138
9956 8774
-5116 -6541
3213 2136
-3082 3209
8056 -7906
-8021 8528
-7291 1066
1811 7353
-7235 9988
-835 4149
2401 -4460
1984 -4881
7...

output:

315649896725

result:

ok 1 number(s): "315649896725"

Subtask #3:

score: 40
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Test #39:

score: 40
Accepted
time: 112ms
memory: 15136kb

input:

200000
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1
-1 -1...

output:

80000000000

result:

ok 1 number(s): "80000000000"

Test #40:

score: 0
Accepted
time: 212ms
memory: 14040kb

input:

200000
3047 1187
7393 -3875
-5122 6307
2466 -5087
-224 -7384
-3245 -9770
1947 2312
8944 621
8066 -5947
9290 -8388
-2717 7190
-8226 5814
6582 5388
8110 1152
8757 1651
-3095 1060
-1289 -2281
-9959 4589
8353 -1524
3758 -4931
-7285 3103
7267 8310
6963 2935
3560 1214
9605 -4119
-6590 35
-5997 -6614
1618 ...

output:

252814959644826317

result:

ok 1 number(s): "252814959644826317"

Test #41:

score: 0
Accepted
time: 210ms
memory: 14600kb

input:

200000
5523 3865
-1333 -1625
-6765 -1061
-3140 -3485
-2703 -9775
5262 7939
8541 -5876
-5566 6827
6125 -3977
-4675 -637
-5217 7574
2096 1280
945 -3668
2529 3021
8305 3559
-4847 9833
9502 -9059
9111 6944
-3199 2669
7677 -1022
-1360 3853
-5351 -4934
-498 3806
642 -9764
-7968 9719
-3485 5614
-5537 9305
...

output:

252918062980551729

result:

ok 1 number(s): "252918062980551729"

Test #42:

score: 0
Accepted
time: 185ms
memory: 13776kb

input:

200000
10 -36
37 43
-57 10
-92 -29
36 99
49 -52
0 -84
-27 -57
10 -35
55 -60
-15 -27
-10 -52
92 -58
-32 -3
-4 -38
-72 71
4 -50
100 -85
36 -89
10 -6
89 22
5 -34
-28 -70
-15 -49
-26 -63
-69 -79
-55 -39
14 -55
-60 58
36 93
40 -89
-13 2
87 10
-6 32
78 4
83 -37
38 -35
-5 -25
-36 -13
78 97
0 -90
-63 -7
-55...

output:

25525740525953

result:

ok 1 number(s): "25525740525953"

Test #43:

score: 0
Accepted
time: 198ms
memory: 13660kb

input:

200000
-23 91
-78 61
3 68
-41 -95
3 -45
54 -91
31 -91
6 79
-26 -76
71 16
-6 -68
-27 -17
90 -35
24 -83
90 55
-66 52
-52 -79
-31 -5
-92 -34
-22 -36
-86 -23
38 -32
-58 -93
-88 10
83 16
-89 1
-14 -98
67 36
-44 14
32 -8
-29 -45
-87 -64
46 -31
26 82
-33 91
-34 -51
29 13
48 90
90 -6
-42 74
7 -74
-8 -93
78 ...

output:

25329386607269

result:

ok 1 number(s): "25329386607269"

Test #44:

score: 0
Accepted
time: 193ms
memory: 15400kb

input:

200000
-7 -84
-2 28
-87 16
-31 -11
81 63
8 -71
62 3
88 14
90 74
-13 53
-7 41
-34 18
78 29
-70 -21
34 -63
-60 33
83 -56
100 85
32 31
47 -66
92 33
-30 22
-98 -67
-100 69
92 85
-60 21
17 -57
69 -15
-69 70
79 -9
-37 50
-9 32
5 -22
7 -18
47 78
50 36
-91 -81
49 46
-34 -99
100 2
-47 -7
-4 -20
0 60
-56 75
8...

output:

25392462829370

result:

ok 1 number(s): "25392462829370"

Test #45:

score: 0
Accepted
time: 220ms
memory: 14724kb

input:

199998
-7641 1103
-5110 -5131
-6106 590
1321 -2431
7153 1056
9152 5009
6347 -2161
-3297 -9256
9916 2498
-3695 690
-772 8631
6339 9679
-1616 3157
-9881 -4496
-8309 -5817
-7162 1048
-378 4209
-3620 2224
7033 350
4795 -8614
8086 9238
335 -3746
-9689 7847
-1852 1529
3486 1144
-637 4557
5970 -153
9677 -1...

output:

250984432919798465

result:

ok 1 number(s): "250984432919798465"

Test #46:

score: 0
Accepted
time: 221ms
memory: 14528kb

input:

200000
6617 5589
-3727 -4454
-7540 9163
8050 -9575
3685 667
287 -2686
5952 -4319
8289 -1291
-3839 8683
-7586 -7703
9877 3945
3594 -7300
-9312 151
-8738 -5208
-4557 -4811
-825 952
627 1681
-9675 2684
2577 5071
3831 -7895
9 3934
7779 5643
3901 -7841
9156 5957
-4247 -8555
-3171 5636
-3527 -6538
7397 -2...

output:

251712125420312385

result:

ok 1 number(s): "251712125420312385"

Test #47:

score: 0
Accepted
time: 210ms
memory: 14392kb

input:

199999
7165 5024
6957 2507
8426 3628
7843 9666
1160 1896
3350 2088
7975 2161
9247 4521
8892 7293
1953 8635
8408 4021
5183 4452
6795 7696
6416 7541
4363 7198
1972 4240
2477 6379
3823 5328
2300 6450
5697 4195
7047 6093
9995 1310
7685 5697
4813 4810
8083 7652
7240 5774
8019 3014
8796 6614
4465 5425
473...

output:

2417416734948423353

result:

ok 1 number(s): "2417416734948423353"

Test #48:

score: 0
Accepted
time: 196ms
memory: 14172kb

input:

200000
-7301 -6194
-7026 -4592
-8837 -2596
-6746 -9310
-3912 -3500
-6055 -9199
-4214 -4414
-9237 -1248
-2849 -1173
-3580 -7786
-5238 -7602
-5038 -8023
-9610 -3231
-4350 -6263
-5721 -9822
-1380 -6206
-1084 -3705
-9578 -7104
-5667 -1780
-5743 -5548
-2893 -7286
-5410 -4620
-2479 -4590
-4832 -9976
-7174...

output:

2422477055528557108

result:

ok 1 number(s): "2422477055528557108"

Test #49:

score: 0
Accepted
time: 190ms
memory: 14068kb

input:

200000
-6280 9242
-7976 8695
-4375 7846
-5909 2860
-2686 8569
-1514 6752
-9642 9846
-6526 5675
-4074 6579
-2589 2332
-9683 1847
-3461 4287
-5071 5480
-4309 7982
-6610 3438
-9706 6018
-8745 1791
-2339 2180
-1229 4019
-3799 2113
-4758 3671
-3018 4150
-6963 4618
-3940 3990
-2680 8830
-6889 6005
-8389 7...

output:

2426689900271712025

result:

ok 1 number(s): "2426689900271712025"

Test #50:

score: 0
Accepted
time: 213ms
memory: 15476kb

input:

200000
-7982 -9777
2104 5045
-393 1398
-1738 862
9999 3675
-8785 9254
-878 -6898
3847 4515
-65 2849
1665 8114
7060 -4482
3643 -1133
8962 4905
-4080 -9841
-1235 -2521
9410 174
-1724 580
-2544 3820
-1819 -2433
3520 7560
-8598 -6885
-4188 -6212
9899 7478
-105 9332
7819 -6226
8107 -893
-3394 -6540
5852 ...

output:

250773199943322530

result:

ok 1 number(s): "250773199943322530"

Test #51:

score: 0
Accepted
time: 117ms
memory: 14532kb

input:

200000
10000 10000
10000 10000
10000 10000
10000 10000
10000 10000
10000 10000
10000 10000
10000 10000
10000 10000
10000 10000
10000 10000
10000 10000
10000 10000
10000 10000
10000 10000
10000 10000
10000 10000
10000 10000
10000 10000
10000 10000
10000 10000
10000 10000
10000 10000
10000 10000
10000...

output:

8000000000000000000

result:

ok 1 number(s): "8000000000000000000"

Test #52:

score: 0
Accepted
time: 52ms
memory: 14588kb

input:

200000
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0...

output:

0

result:

ok 1 number(s): "0"

Test #53:

score: 0
Accepted
time: 176ms
memory: 14848kb

input:

200000
-9576 -9576
-7929 78
9930 9928
5511 5511
-6214 -6213
3384 -33
-7845 77
-7343 -7343
-101 -99
-8796 -8795
-7414 75
-1099 10
-435 4
-9469 -9467
-3792 37
-4072 40
4146 4145
-8692 87
6823 6821
-348 -348
-1376 -1375
3442 -34
2054 -20
-2529 -2529
6148 6148
-4333 42
-7610 -7610
-9457 -9457
-5995 60
9...

output:

311543120007596516

result:

ok 1 number(s): "311543120007596516"

Test #54:

score: 0
Accepted
time: 190ms
memory: 13596kb

input:

195891
369 655
538 872
286 779
528 582
231 690
475 640
408 788
210 976
361 909
224 682
241 887
424 854
372 779
262 614
284 784
290 581
495 595
187 627
439 934
287 815
373 961
330 923
399 623
491 945
516 884
401 682
372 794
284 681
200 740
199 972
197 505
442 639
428 509
320 634
507 669
374 805
341 6...

output:

26981215228828125

result:

ok 1 number(s): "26981215228828125"

Test #55:

score: 0
Accepted
time: 185ms
memory: 15068kb

input:

199997
-3811 -2673
-9904 -6776
-7712 -4592
-4507 -3208
-6132 -4067
-3029 -1604
-3145 -2200
-5666 -3160
-9848 -5107
-3203 -2279
-3339 -1628
-2386 -1266
-7077 -4836
-8441 -4540
-7792 -4007
-992 -692
-6940 -4330
-3827 -2372
-5728 -3742
-7205 -4610
-1474 -1050
-3912 -2151
-6560 -3824
-2396 -1154
-5862 -...

output:

1366056000429500264

result:

ok 1 number(s): "1366056000429500264"

Test #56:

score: 0
Accepted
time: 165ms
memory: 14276kb

input:

200000
4 -7
10 4
6 -9
10 7
6 7
8 0
4 2
4 -6
8 -6
5 4
9 2
7 9
8 -6
7 4
9 7
10 2
6 -10
9 10
7 8
10 -8
5 -10
9 0
6 -1
10 3
10 -8
6 0
8 8
8 -6
6 -10
8 -10
7 -5
4 -8
9 3
4 -4
10 -3
4 3
9 -3
4 -1
5 1
7 -8
9 0
8 -2
6 -6
9 -3
8 -10
4 -1
5 8
7 4
5 5
7 7
6 -9
9 -8
5 -9
10 8
7 10
5 -5
8 7
9 -7
7 -1
5 4
6 3
6 6...

output:

31021422398053

result:

ok 1 number(s): "31021422398053"

Test #57:

score: 0
Accepted
time: 43ms
memory: 12308kb

input:

150009
0 -10000
0 -10000
0 -10000
0 -10000
0 10000
0 10000
0 10000
0 -10000
0 10000
0 -10000
0 10000
0 10000
0 -10000
0 -10000
0 -10000
0 -10000
0 -10000
0 10000
0 -10000
0 -10000
0 -10000
0 -10000
0 10000
0 10000
0 10000
0 -10000
0 -10000
0 10000
0 -10000
0 -10000
0 10000
0 10000
0 10000
0 -10000
0...

output:

1000000390000039546

result:

ok 1 number(s): "1000000390000039546"

Test #58:

score: 0
Accepted
time: 106ms
memory: 10040kb

input:

101851
-848 -389
784 859
670 446
569 -881
580 -956
-904 904
-500 -881
-810 232
-718 -820
877 -261
-767 -711
-911 -161
-63 511
-224 14
-25 888
-501 -20
191 480
-74 -717
-246 -139
-94 -153
-249 -666
-546 2
-414 251
783 -4
736 -132
509 660
-149 -679
832 598
-36 788
676 -391
941 940
772 -473
162 132
994...

output:

652471369533370

result:

ok 1 number(s): "652471369533370"

Test #59:

score: 0
Accepted
time: 109ms
memory: 9808kb

input:

105861
-929 477
614 -887
-487 117
818 -727
157 906
-623 316
-140 -830
-125 39
688 -633
-876 294
-589 -81
12 -486
630 222
-332 41
286 -42
-213 -119
-6 709
179 -598
-325 507
765 349
17 833
-645 -858
533 878
-755 230
-123 573
-508 -279
235 288
-490 857
250 217
-824 531
-588 -112
-403 315
717 759
618 77...

output:

703641551364001

result:

ok 1 number(s): "703641551364001"