QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#238424#7680. Subwayucup-team266#AC ✓1ms4004kbC++143.7kb2023-11-04 16:42:082023-11-04 16:42:08

Judging History

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

  • [2023-11-04 16:42:08]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:4004kb
  • [2023-11-04 16:42:08]
  • 提交

answer

/*
Things to notice:
1. do not calculate useless values
2. do not use similar names
 
Things to check:
1. submit the correct file
2. time (it is log^2 or log)
3. memory
4. prove your naive thoughts 
5. long long
6. corner case like n=0,1,inf or n=m
7. check if there is a mistake in the ds or other tools you use
8. fileio in some oi-contest

9. module on time 
10. the number of a same divisor in a math problem
11. multi-information and queries for dp and ds problems
*/
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define pii pair<long long,long long>
#define mp make_pair
#define pb push_back
const int mod=998244353;
const int inf=0x3f3f3f3f;
const int INF=1e18;

#define pdd pair<double,double>
const double eps=1e-9;
pdd operator +(pdd x,pdd y)
{
	return mp(x.fi+y.fi,x.se+y.se);
}
pdd operator -(pdd x,pdd y)
{
	return mp(x.fi-y.fi,x.se-y.se);
}
pdd operator *(pdd x,double y)
{
	return mp(x.fi*y,x.se*y);
}
double dot(pdd x,pdd y)
{
	return x.fi*y.fi+x.se*y.se;
}
double det(pdd x,pdd y)
{
	return x.fi*y.se-y.fi*x.se;
}
// point q on seg p1--p2
bool onseg(pdd p1,pdd p2,pdd q)
{
	return fabs(det(p1-q,p2-q))<eps&&dot(p1-q,p2-q)<eps;
}
// line p1--p2 q1--q2 intersection
bool good(pdd p1,pdd p2,pdd q1,pdd q2)
{
	if(fabs(det(q2-q1,p2-p1))<eps) return 0;
	return 1;
}
pdd inter(pdd p1,pdd p2,pdd q1,pdd q2)
{
	if(fabs(det(p1-q1,p2-q2))<eps) return mp(-114514.0,-114514.0);
	return p1+(p2-p1)*(det(q2-q1,q1-p1)/det(q2-q1,p2-p1));
}
// if seg p1--q1 p2--q2 has intersection
bool hascommon(pdd p1,pdd q1,pdd p2,pdd q2)
{
	if(fabs(det(p1-q1,p2-q2))<eps) return onseg(p1,q1,p2)||onseg(p1,q1,q2)||onseg(p2,q2,p1)||onseg(p2,q2,q1);
	pdd tmp=inter(p1,q1,p2,q2);
	return onseg(p1,q1,tmp)&&onseg(p2,q2,tmp);
}
int n;
array<int,3> A[55];
int B[55];
mt19937_64 rnd(114514);
int gen_range(int l,int r)
{
	return l+rnd()%(r-l+1);
}
const int K=20001;
vector <pii > pts[55];
void solve()
{
	cin>>n;
	for(int i=1;i<=n;i++) cin>>A[i][0]>>A[i][1]>>A[i][2],A[i][0]+=1001,A[i][1]+=1001;
	sort(A+1,A+1+n);
	int maxx=0;
	for(int i=1;i<=n;i++) maxx=max(maxx,A[i][2]);
	cout<<maxx<<"\n";
	if(n==1)
	{
		A[1][0]-=1001,A[1][1]-=1001;
		int x=A[1][0]+10000,y=A[1][1];
		while(maxx--)
		{
			cout<<2<<" "<<x<<" "<<y<<" "<<A[1][0]<<" "<<A[1][1]<<"\n";
			x--,y++;
		}
		return;
	}
	for(int i=1;i+1<=n;i++)
	{
		int b=A[i][1]+K*A[i][0]/2;
		if(A[i][0]%2==1) 
		{
			b++;
			for(int x=2;pts[i].size()<=50;x+=2) 
			{
				int y=x/2*(-K)+b;
				if(y<0) pts[i].pb(mp(x,y));
			}
		}
		else
		{
			for(int x=1;pts[i].size()<=50;x+=2) 
			{
				int y=-(K/2)*x+b;
				y-=(x-1)/2;
				if(y<0) pts[i].pb(mp(x,y));
			}
		}
	} 
	vector <pair<pdd,pdd > > seg; 
	for(int i=1;i<=maxx;i++)
	{
		vector <pii > vec;
		for(int j=1;j<=n;j++) 
		{
			if(A[j][2]>=i) vec.pb(mp(A[j][0],A[j][1]));
			if(j<n) vec.pb(pts[j][0]),pts[j].erase(pts[j].begin());
		}
		cout<<vec.size()<<" ";
		for(int j=0;j<vec.size();j++) vec[j].fi-=1001,vec[j].se-=1001;
		for(int j=0;j<vec.size();j++) 
		{
			cout<<vec[j].fi<<" "<<vec[j].se<<" ";
			if(j+1<vec.size()) seg.pb(mp((pdd)(vec[j]),(pdd)(vec[j+1])));
		}
		cout<<"\n";
	}
//	for(int i=0;i<seg.size();i++) for(int j=i+1;j<seg.size();j++) if(hascommon(seg[i].fi,seg[i].se,seg[j].fi,seg[j].se))
//	{
//		pdd t=inter(seg[i].fi,seg[i].se,seg[j].fi,seg[j].se);
//		cout<<"inter: \n"<<seg[i].fi.fi<<" "<<seg[i].fi.se<<" --- "<<seg[i].se.fi<<" "<<seg[i].se.se<<"\n";
//		cout<<seg[j].fi.fi<<" "<<seg[j].fi.se<<" "<<seg[j].se.fi<<" "<<seg[j].se.se<<"\n"<<t.fi<<" "<<t.se<<"\n";
//	}
	
}
signed main()
{
//	ios::sync_with_stdio(0);
//	cin.tie(0);
	int _=1;
//	cin>>_;
	while(_--) solve();
	return 0;
}

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

詳細信息

Test #1:

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

input:

3
1 2 1
2 1 2
3 3 2

output:

2
5 1 2 2 -9998 2 1 3 -9999 3 3 
4 4 -29999 2 1 5 -30000 3 3 

result:

ok ok Sum L = 9

Test #2:

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

input:

1
1 1 1

output:

1
2 10001 1 1 1

result:

ok ok Sum L = 2

Test #3:

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

input:

1
1 1 50

output:

50
2 10001 1 1 1
2 10000 2 1 1
2 9999 3 1 1
2 9998 4 1 1
2 9997 5 1 1
2 9996 6 1 1
2 9995 7 1 1
2 9994 8 1 1
2 9993 9 1 1
2 9992 10 1 1
2 9991 11 1 1
2 9990 12 1 1
2 9989 13 1 1
2 9988 14 1 1
2 9987 15 1 1
2 9986 16 1 1
2 9985 17 1 1
2 9984 18 1 1
2 9983 19 1 1
2 9982 20 1 1
2 9981 21 1 1
2 9980 22 ...

result:

ok ok Sum L = 100

Test #4:

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

input:

50
662 -567 48
728 -120 7
307 669 27
-885 -775 21
100 242 9
-784 -537 41
940 198 46
736 -551 30
-449 456 16
-945 382 18
-182 810 49
213 187 44
853 245 48
617 -305 19
-81 261 3
617 208 8
-548 -652 6
-888 -667 14
-371 -812 43
202 -702 10
-668 -725 5
961 -919 33
-870 -697 50
428 810 29
560 405 7
348 -3...

output:

50
99 -981 -193 -980 -10193 -945 382 -944 -9618 -926 671 -925 -9329 -888 -667 -887 -10667 -885 -775 -884 -10775 -870 -697 -869 -10697 -825 381 -824 -9619 -784 -537 -783 -10537 -683 731 -682 -9269 -668 -725 -667 -10725 -579 -437 -578 -10437 -558 825 -557 -9175 -548 -652 -547 -10652 -499 -177 -498 -10...

result:

ok ok Sum L = 3643

Test #5:

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

input:

50
-772 697 1
-756 -909 1
659 923 1
850 471 1
260 -24 1
473 -639 1
-575 393 1
-466 197 1
333 -637 1
-192 -890 1
103 546 1
749 -723 1
-573 613 1
214 -138 1
277 928 1
266 291 1
911 275 1
-680 -67 1
69 190 1
-197 -795 1
684 618 1
729 -115 1
-658 -229 1
-595 -470 1
898 -172 1
401 81 1
133 685 1
223 400 ...

output:

1
99 -772 697 -771 -9303 -756 -909 -755 -10909 -680 -67 -679 -10067 -666 -82 -665 -10082 -658 -229 -657 -10229 -595 -470 -594 -10470 -575 393 -574 -9607 -573 613 -572 -9387 -571 -716 -570 -10716 -532 838 -531 -9162 -530 890 -529 -9110 -466 197 -465 -9803 -389 708 -388 -9292 -346 458 -345 -9542 -304 ...

result:

ok ok Sum L = 99

Test #6:

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

input:

50
-56 747 3
993 -490 4
930 -139 1
-298 -330 1
938 -351 5
-973 100 5
-472 44 4
345 628 5
481 -91 4
789 581 5
457 -29 4
871 -799 1
692 994 4
699 854 2
893 -33 1
-483 256 3
-962 -540 2
846 -893 1
830 609 5
845 -383 2
-552 -966 1
-544 -51 1
564 186 4
-615 -675 1
618 -911 3
-561 -302 4
-293 667 3
-334 -...

output:

5
99 -999 330 -998 -9670 -973 100 -972 -9900 -962 -540 -961 -10540 -888 -613 -887 -10613 -842 381 -841 -9619 -792 -625 -791 -10625 -637 -801 -636 -10801 -615 -675 -614 -10675 -561 -302 -560 -10302 -552 -966 -551 -10966 -544 -51 -543 -10051 -483 256 -482 -9744 -472 44 -471 -9956 -364 169 -363 -9831 -...

result:

ok ok Sum L = 386

Test #7:

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

input:

50
600 997 5
-893 -204 3
408 443 1
-560 -748 7
-647 161 6
-285 -980 1
87 -582 7
-48 -721 7
997 285 2
-189 -728 8
525 222 4
-324 816 9
760 317 3
753 -480 10
-813 -921 3
-325 -875 8
-747 816 10
-627 605 7
775 786 6
136 -54 2
274 948 10
216 -113 7
924 68 3
101 576 8
60 -501 2
898 801 8
-767 -974 10
-99...

output:

10
99 -982 -212 -981 -10212 -980 753 -979 -9247 -972 -312 -971 -10312 -893 -204 -892 -10204 -813 -921 -812 -10921 -805 -304 -804 -10304 -767 -974 -766 -10974 -747 816 -746 -9184 -660 -335 -659 -10335 -647 161 -646 -9839 -627 605 -626 -9395 -560 -748 -559 -10748 -498 -458 -497 -10458 -419 564 -418 -9...

result:

ok ok Sum L = 771

Test #8:

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

input:

50
24 -889 49
117 418 49
25 524 44
980 -416 43
-494 357 41
-287 -285 46
151 574 41
-289 68 49
-515 -540 41
-367 -178 47
-887 151 45
197 -272 47
714 724 45
-737 94 49
810 830 47
808 -695 41
537 -637 49
-142 -167 44
-749 -631 47
445 -444 42
801 910 43
59 363 42
-912 466 50
-649 -479 48
-958 -511 49
88...

output:

50
99 -998 343 -997 -9657 -958 -511 -957 -10511 -912 466 -911 -9534 -887 151 -886 -9849 -868 -114 -867 -10114 -786 -384 -785 -10384 -749 -631 -748 -10631 -737 94 -736 -9906 -649 -479 -648 -10479 -615 809 -614 -9191 -588 -138 -587 -10138 -515 -540 -514 -10540 -494 357 -493 -9643 -486 866 -485 -9134 -...

result:

ok ok Sum L = 4718

Test #9:

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

input:

50
151 -171 50
-367 -951 50
808 569 50
150 -618 50
27 -476 50
-846 729 50
549 -456 50
50 646 50
294 -70 50
-571 104 50
128 -265 50
913 -700 50
267 -965 50
896 846 50
-2 713 50
21 679 50
-515 975 50
168 180 50
-369 -98 50
676 115 50
643 -779 50
920 -237 50
-324 450 50
149 -378 50
-882 -602 50
-126 -7...

output:

50
99 -882 -602 -881 -10602 -851 279 -850 -9721 -846 729 -845 -9271 -841 601 -840 -9399 -604 -168 -603 -10168 -571 104 -570 -9896 -544 307 -543 -9693 -515 975 -514 -9025 -501 927 -500 -9073 -474 780 -473 -9220 -369 -98 -368 -10098 -367 -951 -366 -10951 -335 56 -334 -9944 -324 450 -323 -9550 -302 -98...

result:

ok ok Sum L = 4950

Test #10:

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

input:

50
4 5 34
1 -5 24
-4 -4 32
-3 3 28
0 -1 21
1 -4 25
0 0 30
0 -4 42
-3 -2 44
-5 -3 37
4 -1 46
5 2 20
2 2 37
-2 5 35
-2 -1 39
2 4 32
-4 -3 42
0 3 32
3 5 47
-4 1 2
5 -1 17
-5 -4 5
-2 2 29
-5 1 11
2 -5 43
4 4 14
-5 0 9
0 -5 17
5 1 27
-3 0 24
-1 4 16
5 0 50
3 -2 18
1 -2 6
2 -1 29
-1 3 38
1 5 36
-3 1 28
-3...

output:

50
99 -5 -4 -4 -10004 -5 -3 -4 -10003 -5 0 -4 -10000 -5 1 -4 -9999 -4 -4 -3 -10004 -4 -3 -3 -10003 -4 1 -3 -9999 -3 -3 -2 -10003 -3 -2 -2 -10002 -3 -1 -2 -10001 -3 0 -2 -10000 -3 1 -2 -9999 -3 3 -2 -9997 -3 5 -2 -9995 -2 -5 -1 -10005 -2 -1 -1 -10001 -2 2 -1 -9998 -2 5 -1 -9995 -1 -4 0 -10004 -1 3 0 ...

result:

ok ok Sum L = 3874

Test #11:

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

input:

50
2 0 2
2 -3 2
4 1 2
-3 -3 2
-5 1 2
5 3 2
-5 -3 2
-3 -2 2
2 -1 2
2 3 2
4 4 1
1 -4 1
5 -1 2
-4 1 2
3 -2 1
-1 2 2
5 -5 2
-2 1 2
-5 -1 2
-2 -1 2
-1 -2 2
5 5 1
0 -2 2
1 1 1
2 2 2
3 5 2
-2 -4 1
-3 5 1
4 2 2
-4 -4 2
-3 2 1
5 0 2
-2 -2 2
-4 4 1
-2 5 2
2 5 1
3 -5 2
-4 5 2
-5 5 2
-2 4 2
-5 -5 2
-2 2 2
-3 -4...

output:

2
99 -5 -5 -4 -10005 -5 -3 -4 -10003 -5 -1 -4 -10001 -5 1 -4 -9999 -5 5 -4 -9995 -4 -4 -3 -10004 -4 1 -3 -9999 -4 4 -3 -9996 -4 5 -3 -9995 -3 -4 -2 -10004 -3 -3 -2 -10003 -3 -2 -2 -10002 -3 0 -2 -10000 -3 2 -2 -9998 -3 5 -2 -9995 -2 -4 -1 -10004 -2 -2 -1 -10002 -2 -1 -1 -10001 -2 1 -1 -9999 -2 2 -1 ...

result:

ok ok Sum L = 184

Test #12:

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

input:

50
4 3 49
-5 -3 49
0 -3 50
-2 -4 49
-5 -5 50
4 0 49
-1 -2 49
-2 0 49
1 2 50
-1 -5 50
-5 -1 50
-5 5 49
2 0 50
-2 -3 50
-4 -5 50
0 -2 50
-5 4 50
-1 1 49
-1 -4 49
-3 -1 49
1 -3 50
-4 1 50
0 5 50
1 -2 50
-1 5 50
4 2 50
4 -3 49
1 -4 49
-1 -1 49
-3 -5 50
4 -4 50
3 2 49
3 -3 49
0 2 50
-3 -4 49
5 -1 49
-3 5...

output:

50
99 -5 -5 -4 -10005 -5 -3 -4 -10003 -5 -1 -4 -10001 -5 4 -4 -9996 -5 5 -4 -9995 -4 -5 -3 -10005 -4 1 -3 -9999 -4 4 -3 -9996 -3 -5 -2 -10005 -3 -4 -2 -10004 -3 -1 -2 -10001 -3 5 -2 -9995 -2 -4 -1 -10004 -2 -3 -1 -10003 -2 0 -1 -10000 -2 3 -1 -9997 -1 -5 0 -10005 -1 -4 0 -10004 -1 -2 0 -10002 -1 -1 ...

result:

ok ok Sum L = 4927

Test #13:

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

input:

50
114 514 30
115 514 41
116 514 6
117 514 49
118 514 10
119 514 49
120 514 1
121 514 7
122 514 3
123 514 4
124 514 1
125 514 12
126 514 15
127 514 16
128 514 34
129 514 24
130 514 49
131 514 43
132 514 25
133 514 12
134 514 26
135 514 13
136 514 12
137 514 15
138 514 7
139 514 25
140 514 5
141 514 ...

output:

49
99 114 514 115 -9486 115 514 116 -9486 116 514 117 -9486 117 514 118 -9486 118 514 119 -9486 119 514 120 -9486 120 514 121 -9486 121 514 122 -9486 122 514 123 -9486 123 514 124 -9486 124 514 125 -9486 125 514 126 -9486 126 514 127 -9486 127 514 128 -9486 128 514 129 -9486 129 514 130 -9486 130 51...

result:

ok ok Sum L = 3553

Test #14:

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

input:

50
191 981 19
191 980 41
191 979 20
191 978 14
191 977 2
191 976 49
191 975 40
191 974 3
191 973 20
191 972 6
191 971 13
191 970 4
191 969 4
191 968 47
191 967 32
191 966 11
191 965 34
191 964 30
191 963 3
191 962 16
191 961 24
191 960 30
191 959 34
191 958 31
191 957 24
191 956 29
191 955 42
191 95...

output:

49
99 191 932 192 -9068 191 933 192 -9067 191 934 192 -9066 191 935 192 -9065 191 936 192 -9064 191 937 192 -9063 191 938 192 -9062 191 939 192 -9061 191 940 192 -9060 191 941 192 -9059 191 942 192 -9058 191 943 192 -9057 191 944 192 -9056 191 945 192 -9055 191 946 192 -9054 191 947 192 -9053 191 94...

result:

ok ok Sum L = 3553

Test #15:

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

input:

50
-123 456 47
-122 457 35
-121 458 25
-120 459 35
-119 460 30
-118 461 33
-117 462 21
-116 463 31
-115 464 21
-114 465 35
-113 466 20
-112 467 17
-111 468 25
-110 469 3
-109 470 29
-108 471 35
-107 472 4
-106 473 44
-105 474 4
-104 475 28
-103 476 49
-102 477 9
-101 478 39
-100 479 9
-99 480 21
-98...

output:

50
99 -123 456 -122 -9544 -122 457 -121 -9543 -121 458 -120 -9542 -120 459 -119 -9541 -119 460 -118 -9540 -118 461 -117 -9539 -117 462 -116 -9538 -116 463 -115 -9537 -115 464 -114 -9536 -114 465 -113 -9535 -113 466 -112 -9534 -112 467 -111 -9533 -111 468 -110 -9532 -110 469 -109 -9531 -109 470 -108 ...

result:

ok ok Sum L = 3656

Test #16:

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

input:

50
321 -525 46
322 -526 14
323 -527 16
324 -528 38
325 -529 22
326 -530 24
327 -531 48
328 -532 5
329 -533 7
330 -534 30
331 -535 25
332 -536 2
333 -537 13
334 -538 1
335 -539 33
336 -540 8
337 -541 9
338 -542 2
339 -543 29
340 -544 17
341 -545 41
342 -546 39
343 -547 9
344 -548 47
345 -549 47
346 -...

output:

50
99 321 -525 322 -10525 322 -526 323 -10526 323 -527 324 -10527 324 -528 325 -10528 325 -529 326 -10529 326 -530 327 -10530 327 -531 328 -10531 328 -532 329 -10532 329 -533 330 -10533 330 -534 331 -10534 331 -535 332 -10535 332 -536 333 -10536 333 -537 334 -10537 334 -538 335 -10538 335 -539 336 -...

result:

ok ok Sum L = 3662

Test #17:

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

input:

50
-444 -555 23
-445 -556 32
-446 -557 36
-447 -558 29
-448 -559 4
-449 -560 25
-450 -561 29
-451 -562 5
-452 -563 9
-453 -564 28
-454 -565 35
-455 -566 26
-456 -567 22
-457 -568 39
-458 -569 13
-459 -570 50
-460 -571 37
-461 -572 14
-462 -573 26
-463 -574 49
-464 -575 23
-465 -576 44
-466 -577 2
-4...

output:

50
99 -493 -604 -492 -10604 -492 -603 -491 -10603 -491 -602 -490 -10602 -490 -601 -489 -10601 -489 -600 -488 -10600 -488 -599 -487 -10599 -487 -598 -486 -10598 -486 -597 -485 -10597 -485 -596 -484 -10596 -484 -595 -483 -10595 -483 -594 -482 -10594 -482 -593 -481 -10593 -481 -592 -480 -10592 -480 -59...

result:

ok ok Sum L = 3611

Test #18:

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

input:

50
-142 0 48
-143 1 22
-144 2 45
-145 3 9
-146 4 36
-147 5 46
-148 6 26
-149 7 26
-150 8 9
-151 9 19
-152 10 22
-153 11 14
-154 12 8
-155 13 20
-156 14 41
-157 15 47
-158 16 22
-159 17 50
-160 18 3
-161 19 12
-162 20 15
-163 21 32
-164 22 46
-165 23 45
-166 24 3
-167 25 27
-168 26 33
-169 27 17
-170...

output:

50
99 -191 49 -190 -9951 -190 48 -189 -9952 -189 47 -188 -9953 -188 46 -187 -9954 -187 45 -186 -9955 -186 44 -185 -9956 -185 43 -184 -9957 -184 42 -183 -9958 -183 41 -182 -9959 -182 40 -181 -9960 -181 39 -180 -9961 -180 38 -179 -9962 -179 37 -178 -9963 -178 36 -177 -9964 -177 35 -176 -9965 -176 34 -...

result:

ok ok Sum L = 3761

Test #19:

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

input:

12
1000 1000 50
1000 -1000 50
1000 999 50
999 1000 50
999 -1000 50
-999 1000 50
1000 -999 50
-999 -1000 50
-1000 1000 50
-1000 -1000 50
-1000 -999 50
-1000 999 50

output:

50
23 -1000 -1000 -999 -11000 -1000 -999 -999 -10999 -1000 999 -999 -9001 -1000 1000 -999 -9000 -999 -1000 -998 -11000 -999 1000 -998 -9000 999 -1000 1000 -11000 999 1000 1000 -9000 1000 -1000 1001 -11000 1000 -999 1001 -10999 1000 999 1001 -9001 1000 1000 
23 -1000 -1000 -997 -31001 -1000 -999 -997...

result:

ok ok Sum L = 1150

Test #20:

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

input:

4
1000 1000 50
1000 -1000 50
-1000 1000 50
-1000 -1000 50

output:

50
7 -1000 -1000 -999 -11000 -1000 1000 -999 -9000 1000 -1000 1001 -11000 1000 1000 
7 -1000 -1000 -997 -31001 -1000 1000 -997 -29001 1000 -1000 1003 -31001 1000 1000 
7 -1000 -1000 -995 -51002 -1000 1000 -995 -49002 1000 -1000 1005 -51002 1000 1000 
7 -1000 -1000 -993 -71003 -1000 1000 -993 -69003 ...

result:

ok ok Sum L = 350

Extra Test:

score: 0
Extra Test Passed