QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#788929 | #2599. Anti-stress | 275307894a | AC ✓ | 304ms | 29080kb | C++14 | 3.0kb | 2024-11-27 18:47:33 | 2024-11-27 18:47:35 |
Judging History
answer
#include<bits/stdc++.h>
#define Gc() getchar()
#define Me(x,y) memset(x,y,sizeof(x))
#define Mc(x,y) memcpy(x,y,sizeof(x))
#define d(x,y) ((m)*(x-1)+(y))
#define R(n) (rnd()%(n)+1)
#define Pc(x) putchar(x)
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
#define eb emplace_back
#define all(x) x.begin(),x.end()
using namespace std;using ll=long long;using db=double;using lb=long db;using ui=unsigned;using ull=unsigned long long;using pii=pair<int,int>;
const int N=4e5+5,M=N*40+5,K=1000+5,mod=998244353,Mod=mod-1;const db eps=1e-9;const int INF=1e9+7;mt19937 rnd(28382);
#define Tp template<typename T>
#define Ts template<typename T,typename... Ar>
namespace Debug{
Tp void _debug(char* f,T t){cerr<<f<<'='<<t<<endl;}
Ts void _debug(char* f,T x,Ar... y){while(*f!=',') cerr<<*f++;cerr<<'='<<x<<",";_debug(f+1,y...);}
#ifdef LOCAL
#define gdb(...) _debug((char*)#__VA_ARGS__,__VA_ARGS__)
#else
#define gdb(...) void()
#endif
}using namespace Debug;
int n;
using cp=complex<db>;
cp A[N];
void read(cp &x){
uniform_real_distribution<> rd(0,eps);
int a,b;scanf("%d%d",&a,&b);
x=cp(a+rd(rnd),b+rd(rnd));
}
int flag=0;
int v1[N],v2[N];
db cross(cp x,cp y){
return x.real()*y.imag()-x.imag()*y.real();
}
pair<db,int> i1[N],i2[N];
using line=pair<cp,cp>;
cp xPt(line x,line y){
db S1=cross(x.fi-y.fi,y.se),S2=cross(y.se,x.fi+x.se-y.fi);
// gdb(S1,S2);
return x.fi+x.se*S1/(S1+S2);
}
int calc(db angle){
if(flag) return 0;
cp way1=cp(cos(angle),sin(angle));
for(int i=1;i<=2*n;i++) i1[i]=make_pair(cross(A[i],way1),i);
nth_element(i1+1,i1+n+1,i1+2*n+1);
for(int i=1;i<=2*n;i++) v1[i1[i].se]=(i<=n);
cp way2=way1*cp(0,1);
for(int i=1;i<=2*n;i++) i2[i]=make_pair(cross(way2,A[i]),i);
nth_element(i2+1,i2+n+1,i2+2*n+1);
for(int i=1;i<=2*n;i++) v2[i2[i].se]=(i<=n);
int cnt=0;
for(int i=1;i<=n;i++) if(v1[i]&&v2[i]) cnt++;
for(int i=n+1;i<=2*n;i++) if(!v1[i]&&!v2[i]) cnt--;
if(!cnt){
flag=1;
int mx1=max_element(i1+1,i1+n+1)->se,mi1=min_element(i1+n+1,i1+2*n+1)->se;
int mx2=max_element(i2+1,i2+n+1)->se,mi2=min_element(i2+n+1,i2+2*n+1)->se;
cp pt=xPt(make_pair((A[mx1]+A[mi1])/2.0,way1),make_pair((A[mx2]+A[mi2])/2.0,way2));
printf("%.9lf %.9lf\n",pt.real(),pt.imag());
vector<int> st[2][2][2];
for(int i=1;i<=2*n;i++) st[v1[i]][v2[i]][i<=n].push_back(i);
static int ans[N];
for(int x:{0,1}) for(int y:{0,1}){
assert(st[x][y][1].size()==st[x^1][y^1][0].size());
for(int i=0;i<st[x][y][1].size();i++) ans[st[x][y][1][i]]=st[x^1][y^1][0][i]-n;
}
for(int i=1;i<=n;i++) printf("%d%c",ans[i]," \n"[i==n]);
}
return cnt;
}
void Solve(){
scanf("%d",&n);
for(int i=1;i<=n;i++) read(A[i]);
for(int i=1;i<=n;i++) read(A[i+n]);
flag=0;
db l=0,r=acos(-1)/2,mid;
int wl=calc(l),wr=calc(r);
for(int i=1;!flag;i++){
mid=(l+r)/2;
int w=calc(mid);
// gdb(wl,wr,w);
if(1ll*w*wl<0) r=mid,wr=w;
else l=mid,wl=w;
}
assert(flag);
}
int main(){
int t=1;
scanf("%d",&t);
while(t--) Solve();
cerr<<clock()*1.0/CLOCKS_PER_SEC<<'\n';
}
詳細信息
Test #1:
score: 100
Accepted
time: 2ms
memory: 12384kb
input:
3 3 -2 -2 1 2 -1 3 -2 3 -1 -1 2 -1 2 1 2 -1 0 2 -1 0 0 2 3 2 -2 -1 -3 -1 1 -3
output:
0.191620060 0.842741482 1 2 3 0.500000001 0.000000000 2 1 -1.249999999 -1.250000000 1 2
result:
ok Correct matching.
Test #2:
score: 0
Accepted
time: 130ms
memory: 12336kb
input:
36292 6 -6 10 -9 7 -7 -7 6 6 3 -6 2 -7 8 10 7 7 9 7 -9 9 5 5 -1 1 10 10 0 -4 2 10 -4 -8 9 9 -10 -8 2 4 -2 2 4 0 -9 10 4 4 -8 -6 8 0 7 5 0 -5 5 3 -9 3 7 4 -3 1 3 -9 -8 5 -3 4 1 -7 -1 10 -3 3 -4 2 -1 0 6 -7 8 -6 -8 0 -8 7 3 7 3 8 10 -10 8 -4 -2 0 1 -5 5 7 -6 1 6 -10 3 5 3 -5 4 -2 -3 0 -10 5 -2 -6 3 0 ...
output:
-1.230077553 2.883883477 3 5 1 6 4 2 2.500000000 1.000000000 2 1 3 4 5 6 9 8 7 10 -2.000000000 1.000000001 1 5 4 2 3 -1.999999999 4.000000000 3 1 2 0.540983607 -2.950819672 3 2 1 4 5 7 6 -5.499999999 0.000000001 1 2 2.500000001 -3.500000000 1 0.901053776 -0.418796932 1 4 3 2 7 10 6 9 5 8 -0.99999999...
result:
ok Correct matching.
Test #3:
score: 0
Accepted
time: 136ms
memory: 12392kb
input:
36411 9 -34 31 -31 -16 33 -11 -30 -22 -47 -14 29 -45 45 -21 -48 8 -22 13 -24 7 5 45 -36 -13 31 -19 -46 -36 8 -12 -2 47 25 47 -22 0 2 -33 5 -5 -43 -21 -40 -5 34 4 -41 37 -46 17 -5 15 35 -37 -31 -11 36 -50 -42 -28 -23 13 1 2 20 23 43 8 -20 -43 -6 -12 -7 -25 37 -50 -11 -36 12 -41 26 -22 26 8 31 45 -15 ...
output:
-21.999999999 -11.500000000 4 2 3 7 8 1 9 6 5 -23.750000000 -14.249999999 1 2 -27.740485194 -0.787689399 1 2 3 4 12.500000001 31.500000001 1 -6.500000000 -23.500000000 1 2 4 3 8 6 5 7 -12.999999999 27.000000000 3 4 2 1 -7.000000000 -35.500000000 1 9.000000001 -3.000000000 4 5 2 3 1 -13.381094162 -7....
result:
ok Correct matching.
Test #4:
score: 0
Accepted
time: 143ms
memory: 12476kb
input:
36364 4 381 297 -714 -366 -612 103 -54 83 547 820 209 -461 -256 200 272 806 10 -288 24 -600 599 -820 446 527 -788 -944 -864 115 582 -491 664 -456 -539 892 882 193 305 760 491 304 958 131 925 463 396 236 -476 946 751 478 -428 -218 244 -980 193 -598 -514 9 346 3 -681 818 -276 618 662 680 -306 401 211 ...
output:
-79.376307525 189.732909244 3 1 2 4 3.303887322 281.046184467 2 1 4 8 3 5 7 6 10 9 -1.499999999 151.500000001 5 1 2 7 4 9 6 8 3 5.750000000 371.750000001 1 3 2 4 245.479224909 174.516680103 4 3 1 5 6 2 21.500000001 -219.000000000 1 -36.499999999 54.500000000 2 1 4 3 6 7 5 8 9 -283.000000000 237.5000...
result:
ok Correct matching.
Test #5:
score: 0
Accepted
time: 160ms
memory: 14400kb
input:
36216 8 470239 783597 -640594 464826 -765243 497131 -664639 931093 -743228 -321578 251364 -351643 -245650 343889 -432941 -405881 -236495 653370 -813459 113063 555066 -455887 756859 -189571 19363 684607 659586 668452 623557 -411083 -18951 -175297 10 498355 -831065 621160 -962570 -855224 479687 439140...
output:
-127722.999999999 228476.000000000 2 3 4 7 5 1 8 6 -179265.499999999 37894.000000000 3 6 1 9 5 8 7 2 4 10 344587.500000001 -311111.999999999 4 1 5 3 7 2 6 10311.856332874 216863.984483220 5 1 9 2 7 3 6 4 8 58167.500000001 24358.000000001 1 3 5 9 6 4 10 2 7 8 637828.500000001 188534.000000001 2 1 -22...
result:
ok Correct matching.
Test #6:
score: 0
Accepted
time: 123ms
memory: 14440kb
input:
3693 18 841 494 851 70 -346 827 918 934 -71 -492 -148 447 -701 -957 270 -541 -333 -823 -672 80 86 369 871 -333 -615 -428 -531 258 -182 -81 -793 158 -961 -690 -564 -630 519 -403 -741 -882 -389 402 -938 -368 147 369 942 187 555 392 36 -91 696 730 -298 379 -162 18 347 -755 163 924 -335 -850 -378 -784 -...
output:
-171.999999999 44.000000000 2 4 1 14 3 15 5 10 6 8 16 18 7 11 9 12 13 17 -75.999999999 -2.000000000 1 16 2 4 5 22 6 3 11 12 24 8 10 14 15 30 7 17 13 9 21 20 25 32 27 29 28 18 33 34 36 44 31 37 39 45 46 40 41 52 60 42 19 23 43 49 56 61 26 62 35 57 38 48 64 66 53 47 50 58 54 51 68 59 65 63 75 77 69 74...
result:
ok Correct matching.
Test #7:
score: 0
Accepted
time: 157ms
memory: 14536kb
input:
203 910 829 927 -699 -726 -994 971 556 470 -619 672 -114 732 969 255 -951 978 -599 -370 -167 473 -264 -600 679 86 164 -982 119 -40 807 -445 -856 433 539 -503 -796 -434 -141 61 562 -172 -790 -274 13 768 -628 632 -413 -979 -36 669 -488 -9 7 529 -345 934 655 -617 816 -844 32 -369 -241 82 115 -717 -769 ...
output:
33.500000001 31.000000001 7 1 2 22 6 10 26 12 3 13 8 35 4 5 9 17 14 11 23 15 19 24 25 21 29 27 32 37 16 18 28 40 20 42 30 38 43 36 44 46 31 39 45 49 50 53 51 55 47 48 60 54 57 65 56 59 33 34 62 75 61 66 41 76 67 52 64 58 63 71 68 80 69 70 72 74 81 89 73 77 78 83 79 91 82 84 94 85 90 93 95 96 92 103 ...
result:
ok Correct matching.
Test #8:
score: 0
Accepted
time: 178ms
memory: 12972kb
input:
27 6440 818 -900 713 160 -719 468 -150 717 -985 204 908 -160 -246 499 -275 -246 615 -629 -697 607 159 236 -979 912 -941 -841 130 -646 -501 75 -248 545 968 -437 -183 221 304 -582 338 347 -221 497 230 883 10 -594 -21 407 436 -328 -121 -778 391 -443 -854 -109 630 761 -79 -71 -149 -551 889 -835 142 -218...
output:
5.670938233 0.674215563 11 12 1 8 2 15 3 5 21 4 9 6 7 16 13 17 24 19 31 10 23 14 20 18 32 22 48 35 25 27 30 58 59 34 36 26 28 45 76 49 37 29 50 55 38 62 33 39 41 42 43 40 46 47 44 60 79 86 61 63 65 89 51 92 52 68 53 67 69 70 71 54 56 72 100 81 77 101 104 111 57 82 84 83 88 97 64 66 73 90 96 120 98 7...
result:
ok Correct matching.
Test #9:
score: 0
Accepted
time: 185ms
memory: 18208kb
input:
7 10438 159 -331 668 142 -833 -709 -219 202 -568 -795 -720 -251 -164 -973 -477 -145 -791 -630 -983 -169 -147 85 491 -269 620 -482 408 543 892 -405 -326 176 351 383 -794 -890 277 202 -41 678 -312 -642 201 -684 -819 925 861 -531 -356 990 -525 971 538 -423 -323 -735 927 121 -184 419 112 -451 990 381 95...
output:
4.549227122 1.670287060 3 1 2 7 6 9 13 18 19 20 12 11 15 4 22 14 5 25 8 17 28 35 27 37 29 30 40 31 10 32 44 16 46 34 43 39 41 21 45 54 47 57 50 64 68 61 52 63 56 84 97 59 23 99 72 60 76 87 88 104 62 106 24 26 33 36 89 91 92 73 74 75 38 42 96 110 102 48 108 116 78 79 109 112 80 115 49 51 53 119 118 8...
result:
ok Correct matching.
Test #10:
score: 0
Accepted
time: 167ms
memory: 16696kb
input:
5 21180 262219 263123 -944534 210615 -462795 -276945 925020 720491 348777 869412 -983870 145461 -767025 294250 -832863 207420 -647519 289719 209433 -1061 -202163 582071 652837 993295 -993729 -564553 -969139 -715445 -270581 577207 499682 872285 308421 -930594 779882 -791269 598399 -166801 499301 2930...
output:
2418.399002735 5644.126621105 1 3 7 4 8 14 9 15 10 11 13 12 21 22 17 16 2 5 6 18 19 33 23 24 31 20 34 37 28 41 32 25 42 36 30 40 35 38 39 45 52 26 43 50 46 51 56 53 63 64 61 27 67 70 72 85 66 47 54 68 71 57 29 58 44 65 48 69 74 75 93 76 94 96 98 49 103 106 113 80 114 55 124 73 59 128 81 129 77 130 8...
result:
ok Correct matching.
Test #11:
score: 0
Accepted
time: 269ms
memory: 28040kb
input:
1 200000 -606339 414325 338041 279966 574429 -565678 650314 -471369 988082 295144 -694221 561461 579791 498589 384459 -750025 805097 156635 -336939 -789890 300816 -529579 543398 920710 -861764 31611 998776 -928943 -327814 469539 -875828 488656 138426 907529 -599841 171122 -839114 19033 -962935 -3488...
output:
-428.036107785 -893.519495359 1 6 4 13 16 3 21 7 31 8 12 2 10 14 5 15 9 20 22 24 25 19 33 26 23 37 11 39 27 42 17 18 44 28 34 45 46 38 49 52 53 65 56 57 66 30 29 73 35 58 32 59 60 36 40 74 41 77 81 63 87 47 70 43 48 72 50 54 55 88 75 79 51 62 89 93 80 61 97 67 64 69 104 68 71 106 76 78 107 85 86 82 ...
result:
ok Correct matching.
Test #12:
score: 0
Accepted
time: 259ms
memory: 28468kb
input:
1 200000 -1637 3199 -6422 4241 -7046 -8387 -9568 -3915 -6399 -4473 7975 -6069 4112 3442 9595 3517 -2764 -1214 8928 2712 2011 3973 624 1572 9633 -5651 -7478 1689 6252 422 2596 7862 5428 809 -8808 5466 8454 -2170 6188 -9308 -4397 3385 -9848 -9360 -3569 -8999 917 -7083 -9633 -9061 -2222 7849 8215 9760 ...
output:
-14.054692080 6.365106246 1 2 10 3 4 8 26 27 5 33 6 7 38 9 40 11 47 13 48 12 15 19 14 16 24 18 28 60 17 30 29 32 20 62 21 34 42 35 22 64 23 45 46 25 69 80 31 53 37 84 87 92 36 93 41 54 39 49 50 43 55 52 56 63 95 97 66 98 59 65 67 68 70 44 51 73 74 100 76 79 82 90 118 81 57 58 86 61 71 119 72 99 88 9...
result:
ok Correct matching.
Test #13:
score: 0
Accepted
time: 270ms
memory: 28060kb
input:
1 200000 583 -894 -221 -178 -916 -20 458 792 845 -429 742 -894 826 395 387 -436 -499 -382 124 707 -175 830 853 830 211 458 358 -117 -154 -948 799 0 114 727 -95 578 570 -239 -415 105 173 -676 -730 -527 480 -651 395 167 -363 -834 126 -704 -101 243 -892 -461 308 4 413 334 -398 196 354 399 157 -219 -471...
output:
1.604577527 0.818179651 1 8 12 9 2 3 5 4 16 10 15 19 23 7 6 13 25 26 14 20 11 22 17 18 30 31 27 43 21 24 46 28 33 47 53 29 54 32 35 36 40 37 38 48 61 65 39 42 55 57 34 41 44 49 50 45 67 70 52 69 75 76 79 85 71 88 56 73 51 90 58 60 62 80 91 59 63 74 94 64 66 68 97 72 81 100 84 78 82 87 93 77 106 107 ...
result:
ok Correct matching.
Test #14:
score: 0
Accepted
time: 245ms
memory: 29080kb
input:
1 200000 -49 331 14 -366 66 381 -357 -293 257 310 196 -89 103 -275 -49 393 -250 -389 72 222 48 390 291 -220 233 -231 -311 -30 164 -389 -218 -92 -153 -33 -174 309 324 205 159 326 -129 269 184 72 352 -238 -365 321 -343 -329 -35 -2 44 274 -395 -269 -309 235 -138 250 -390 -45 -23 212 -278 279 71 27 221 ...
output:
0.119102561 0.188977497 3 11 4 1 5 12 17 10 2 6 16 20 21 7 23 8 13 18 9 14 32 22 25 44 15 19 49 27 53 55 28 56 57 24 37 38 60 64 30 36 39 26 29 70 31 41 33 34 42 46 35 50 71 77 59 45 47 62 63 67 73 86 88 82 83 48 92 51 93 98 40 43 102 52 54 66 96 100 110 69 118 105 112 120 117 121 74 122 58 61 65 68...
result:
ok Correct matching.
Test #15:
score: 0
Accepted
time: 139ms
memory: 12276kb
input:
36430 2 -1000000 -1000000 1000000 1000000 -1000000 1000000 1000000 -1000000 9 -777937 477553 -777941 477552 -777940 477550 -777938 477545 -777940 477548 -777942 477551 -777937 477552 -777941 477547 -777937 477548 -777939 477547 -777942 477552 -777937 477551 -777942 477547 -777939 477548 -777940 4775...
output:
0.000000000 0.000000001 1 2 -777939.500000000 477550.000000000 4 1 5 2 3 7 6 8 9 284605.000000001 -56283.500000000 2 1 -819865.500000000 -118498.000000000 2 1 3 -716661.500000000 820076.500000000 1 4 5 2 3 673184.500000001 -643994.500000000 1 -376532.999999999 805494.500000000 1 2 -347389.000000000 ...
result:
ok Correct matching.
Test #16:
score: 0
Accepted
time: 136ms
memory: 12320kb
input:
6655 2 -1000000 -1000000 1000000 1000000 -1000000 1000000 1000000 -1000000 14 651020 -747933 651350 -747242 651363 -746974 652265 -747226 651626 -747438 651140 -747540 651211 -746670 651402 -746424 649773 -747810 651583 -747639 651348 -747113 650973 -747182 651660 -747488 651186 -747874 651384 -7443...
output:
0.000000000 0.000000001 1 2 651342.497133325 -747229.826661666 4 1 7 6 2 5 8 10 13 3 11 12 9 14 -635683.912391903 -746753.848501149 1 5 3 7 6 11 13 2 4 10 9 14 15 18 8 17 12 19 22 26 34 20 16 29 32 33 39 25 36 27 38 28 41 21 23 24 30 42 35 31 37 43 44 40 -197022.057268291 -331021.421049860 3 7 1 2 8...
result:
ok Correct matching.
Test #17:
score: 0
Accepted
time: 152ms
memory: 12356kb
input:
365 2 -1000000 -1000000 1000000 1000000 -1000000 1000000 1000000 -1000000 311 238716 591775 239333 590462 240554 588783 242438 595830 238254 591328 239713 590830 239382 593329 239910 592455 233213 589481 239432 591749 237646 590006 241894 589909 237491 592410 239566 591589 239118 591725 239446 59161...
output:
0.000000000 0.000000001 1 2 239564.880599007 591569.459018505 1 7 12 4 10 15 5 6 21 9 24 2 25 16 29 33 18 31 32 3 8 19 35 20 11 39 22 27 36 13 28 37 44 14 42 30 34 38 46 48 58 40 65 43 45 53 56 63 67 17 23 26 69 41 52 60 66 47 72 49 68 50 79 70 51 73 75 76 54 82 85 78 92 55 83 94 95 80 57 84 81 59 9...
result:
ok Correct matching.
Test #18:
score: 0
Accepted
time: 161ms
memory: 15152kb
input:
21 2 -1000000 -1000000 1000000 1000000 -1000000 1000000 1000000 -1000000 11693 -108541 944389 -243026 127229 -143494 993567 -861767 933461 -290324 823158 -148496 779870 -111661 985235 -184192 523927 -111600 504277 -432479 876159 -122711 955045 -82769 982522 -763261 907076 -62777 997365 -206031 86446...
output:
0.000000000 0.000000001 1 2 -49525.084869627 849910.508735062 4 1 14 16 2 3 19 5 6 21 25 27 29 31 37 7 43 45 46 48 50 51 53 54 58 8 9 59 61 64 10 11 12 13 15 17 65 66 69 70 18 20 22 72 23 24 26 28 76 77 81 83 85 86 30 89 32 33 34 35 92 36 93 94 212 95 38 98 39 79 40 99 100 41 42 103 44 47 49 107 52 ...
result:
ok Correct matching.
Test #19:
score: 0
Accepted
time: 205ms
memory: 27936kb
input:
2 2 -1000000 -1000000 1000000 1000000 -1000000 1000000 1000000 -1000000 199998 114210 313717 67901 238564 319237 493746 162053 407019 61923 262711 194887 505952 152656 278547 107279 495080 75444 280845 123738 307481 223451 -89009 163822 365798 168291 267894 77566 341698 175982 410853 88120 447816 10...
output:
0.000000000 0.000000001 1 2 114618.044976587 354922.774533034 3 4 12 23 6 25 1 32 7 8 20 2 10 5 35 37 9 11 18 21 28 38 39 24 42 26 13 14 27 46 47 29 30 15 31 49 53 16 52 61 34 17 62 55 56 68 40 69 57 59 41 43 19 73 78 51 22 33 54 60 36 83 44 45 63 81 84 48 50 64 65 66 67 58 70 90 82 85 91 71 77 96 7...
result:
ok Correct matching.
Test #20:
score: 0
Accepted
time: 141ms
memory: 12452kb
input:
6690 29 -999349 -12743 999491 329116 999233 769126 999234 235658 999161 121818 -999184 -403579 -999073 -210792 -999113 -496827 999146 -441066 999044 -332863 -999113 589751 -999207 768823 999138 -740492 -999065 926774 -999255 -39270 -999312 827526 999234 -690829 -999021 230022 999060 -471659 999127 5...
output:
102963.480519495 -129643.063732041 9 4 8 10 16 3 7 12 1 2 13 14 5 17 19 21 6 23 11 18 22 20 25 15 26 27 24 28 29 176581.500000001 367170.000000000 4 1 3 5 9 2 10 8 6 7 278133.271230491 254945.271961795 1 2 11 6 4 3 16 8 7 9 5 14 10 13 12 15 316226.167413485 353149.010776712 5 12 1 14 16 8 2 7 3 4 6 ...
result:
ok Correct matching.
Test #21:
score: 0
Accepted
time: 139ms
memory: 14392kb
input:
1583 171 654256 313526 891237 527453 863411 883351 993261 273315 689160 612927 999997 337081 999995 -999483 940162 430738 573747 616873 999995 522992 687784 941944 634995 524574 474087 626175 590278 940035 733319 533323 999995 930772 -999998 593102 857881 552570 -999995 -927500 903465 768309 -999995...
output:
596338.387419570 561588.882019372 1 4 9 2 13 3 5 16 6 25 26 17 7 8 18 39 10 40 11 44 14 46 23 24 49 15 56 29 30 36 38 21 12 19 45 22 20 50 28 27 62 32 33 34 52 35 37 65 54 67 41 31 70 60 77 43 86 42 51 47 55 48 61 58 59 87 53 88 57 64 66 63 74 69 72 68 81 73 76 71 90 75 91 79 94 80 95 82 96 83 89 84...
result:
ok Correct matching.
Test #22:
score: 0
Accepted
time: 196ms
memory: 12820kb
input:
39 5976 999992 127121 999994 -308946 999992 -276611 999995 -218499 -999992 -782131 -999991 -48428 -999992 -643493 -999991 62924 -999991 954442 -999991 -451462 477085 533760 999992 -222765 -999991 -53496 -999993 824729 999991 825759 999995 390439 -999994 -629971 999995 603663 999991 807990 -999997 84...
output:
39554.960544313 28322.394037429 1 4 7 8 5 16 19 2 3 20 11 12 29 6 13 15 31 17 24 9 32 22 23 10 34 26 28 33 37 14 25 50 18 27 55 60 21 30 35 38 63 43 78 36 81 39 49 56 85 46 47 62 48 65 66 89 69 80 94 82 40 97 41 84 57 42 88 44 99 45 98 51 58 52 53 100 102 103 54 105 106 112 64 117 118 67 134 136 139...
result:
ok Correct matching.
Test #23:
score: 0
Accepted
time: 196ms
memory: 18956kb
input:
42 5456 509163 827624 999993 110164 999996 -73345 -999998 939890 -999993 -87445 919382 705576 999993 -248503 999994 995686 -999993 -910845 999993 -977845 999994 849401 -999993 -337441 999994 910947 833156 754713 999996 -53875 999993 752075 999996 -485281 999994 -648307 -999996 -944008 999997 -116917...
output:
508395.557512140 529565.219783418 1 5 10 2 18 3 11 4 19 15 7 20 8 9 17 12 21 23 22 24 32 16 25 28 33 6 35 26 38 27 30 31 41 34 42 37 48 43 13 50 39 62 53 14 40 44 45 63 66 55 68 75 29 46 57 47 49 76 51 58 52 59 60 54 77 61 64 74 65 67 78 36 69 70 81 84 86 79 56 71 82 87 94 88 95 90 96 92 101 97 104 ...
result:
ok Correct matching.
Test #24:
score: 0
Accepted
time: 205ms
memory: 14960kb
input:
35 2397 999983 18732 -999983 232937 772248 609414 -999981 367050 968951 973138 560824 702245 734055 637520 685208 614813 999984 -733334 -999982 -231331 646579 536159 -999986 879007 999983 -378821 649894 537676 999988 -171140 999988 -388266 995398 942669 -999982 754928 768578 744242 999981 129617 602...
output:
583780.185799615 627139.157361506 5 8 10 11 2 1 4 12 13 19 15 3 18 22 25 29 6 16 7 31 9 20 33 14 36 23 21 17 24 30 34 38 35 26 39 43 40 42 27 28 41 52 46 32 58 50 37 48 51 55 53 56 60 44 45 59 62 63 47 61 64 49 65 67 70 69 72 54 74 71 73 57 66 68 83 76 77 75 79 82 84 90 88 92 78 80 96 86 81 103 93 8...
result:
ok Correct matching.
Test #25:
score: 0
Accepted
time: 190ms
memory: 12752kb
input:
35 8034 -999991 -993606 328030 623683 -999990 899879 889749 426319 499113 540693 -999990 927789 783426 677810 560534 593266 717350 877522 927769 534798 685309 613082 -999990 -819611 999990 -961649 -999990 -785332 694852 821628 999990 -362056 -999992 -716041 999990 676275 999990 902576 999990 575980 ...
output:
521073.304709668 643556.269391600 1 9 3 2 10 6 4 5 7 17 19 15 23 20 12 25 24 14 16 27 28 8 18 11 32 36 29 38 33 44 39 40 41 13 54 22 48 30 59 61 34 21 26 49 62 50 43 31 46 52 57 65 70 47 75 79 35 56 37 76 82 81 86 58 87 42 88 64 89 91 95 94 97 66 45 98 96 71 102 111 72 114 117 100 119 132 134 101 13...
result:
ok Correct matching.
Test #26:
score: 0
Accepted
time: 304ms
memory: 28300kb
input:
1 200000 999987 -15241 -999983 -701347 -999994 133240 999989 560206 999983 -881240 -999990 -720290 -999986 -233768 999983 665544 -999994 -116869 -999985 -788988 999985 917557 999991 -108112 -999986 879675 999992 533551 -999985 -839296 -999994 -798220 999987 -59872 999987 -70417 -999987 -439806 -9999...
output:
19970.436289300 19060.094326224 2 1 4 5 6 3 8 14 10 11 16 9 7 20 21 23 12 13 25 29 31 17 34 15 18 19 22 35 24 27 32 43 36 46 37 26 38 28 39 51 52 41 45 30 33 42 44 49 54 47 56 40 50 59 70 48 62 66 53 68 75 55 76 72 79 77 88 97 90 91 57 58 92 105 107 95 60 63 61 110 64 109 73 65 67 69 71 111 80 119 1...
result:
ok Correct matching.
Test #27:
score: 0
Accepted
time: 259ms
memory: 28412kb
input:
1 200000 -999995 -164553 999997 59091 999995 -59405 -999995 121191 999996 -202618 856314 228293 999997 268013 -999996 848722 -999995 977185 999999 -512158 958170 732779 999996 10281 999995 -528747 -999995 -943141 999996 -780954 999995 586719 -999998 -401799 997774 833810 -999995 -535337 832336 32972...
output:
225612.805310159 130030.018808152 10 3 4 16 5 7 8 1 2 6 9 11 12 17 20 14 18 15 21 19 27 22 24 26 13 29 23 35 43 31 32 34 36 37 40 44 33 56 45 46 57 52 25 41 28 60 42 63 30 50 51 64 71 76 78 66 38 82 67 53 84 69 55 94 58 70 75 59 65 68 96 92 100 77 39 81 47 98 48 103 83 101 102 105 106 107 113 122 12...
result:
ok Correct matching.
Test #28:
score: 0
Accepted
time: 294ms
memory: 28996kb
input:
1 200000 -999982 -155847 627124 696431 999982 -264487 -999990 114868 -999991 518159 -999984 -805360 -999985 953611 -999987 -569572 149095 686123 63543 944305 101753 786207 999989 963127 -999983 -358258 999980 -398525 -999981 -448627 -999983 -821762 999990 558331 492170 315810 424574 799301 305066 79...
output:
267699.859536492 457564.989738903 13 8 2 14 1 20 5 21 6 15 19 9 23 3 24 25 10 4 11 12 7 17 16 18 22 28 29 26 27 33 31 32 30 38 41 35 51 40 56 36 34 37 58 42 61 39 44 50 46 47 48 43 52 53 57 63 65 66 55 60 69 64 67 71 73 70 45 72 82 85 75 90 49 74 98 79 76 54 77 80 101 106 87 109 78 89 59 92 93 102 1...
result:
ok Correct matching.
Test #29:
score: 0
Accepted
time: 289ms
memory: 28112kb
input:
1 200000 -999999 9827 999999 -379260 -999999 703803 -999999 438219 999999 563312 -999999 502962 -1000000 494293 -999999 -233673 -999999 -114353 1000000 370155 999999 -897382 974012 789643 -1000000 748823 1000000 -361812 999999 833742 -999999 661402 -999999 283567 -999999 -752981 -999999 309334 -9999...
output:
225965.778755591 99080.624687983 7 3 2 5 1 9 12 17 21 4 10 6 13 18 8 16 26 25 29 31 11 19 20 14 35 22 30 45 15 27 33 34 38 49 46 56 60 23 36 54 37 43 24 55 64 63 66 68 84 94 96 105 51 106 75 107 111 28 53 114 117 78 32 57 39 59 119 40 128 86 61 88 62 41 130 65 69 132 42 44 135 139 89 93 47 146 100 7...
result:
ok Correct matching.
Test #30:
score: 0
Accepted
time: 220ms
memory: 28212kb
input:
1 200000 332441 566838 999998 -949961 939146 621184 -999998 71402 999998 839248 999998 -708853 -999998 -733917 512632 545134 -999998 823453 900330 695985 999999 -209134 -999998 251755 999998 -362609 128236 682156 999999 55587 -999998 -856155 514778 886343 -1000000 12442 -999999 851712 -999998 -84466...
output:
335022.275451635 579149.039426703 7 1 3 10 6 8 14 11 2 13 15 20 16 4 18 26 24 28 5 39 19 9 46 29 50 30 54 12 55 34 36 40 17 49 22 21 27 62 52 53 32 33 59 71 23 25 35 83 38 64 84 31 42 43 44 37 85 45 41 65 47 89 67 69 99 48 101 56 57 58 70 51 74 79 60 104 108 80 110 61 119 82 121 63 88 122 66 68 126 ...
result:
ok Correct matching.
Test #31:
score: 0
Accepted
time: 269ms
memory: 28368kb
input:
1 200000 999998 304062 933647 397976 -999998 -876186 842200 727374 994848 391990 999998 427042 999998 592173 -999998 131495 999998 970876 909744 570178 529437 86323 905280 931531 999998 254217 -999998 -441460 999998 -328408 999998 -560295 999998 555075 922353 224262 603786 538655 -999998 219928 5919...
output:
679838.427949405 383502.373789193 8 1 2 5 9 11 20 3 23 27 4 28 13 6 16 17 29 21 7 10 14 18 22 33 24 35 44 38 25 12 26 40 15 41 19 30 31 32 49 56 34 36 50 37 39 59 46 67 70 71 48 75 51 42 52 43 78 45 47 55 57 58 65 66 80 60 82 61 69 53 63 54 73 74 72 62 88 90 77 97 98 79 84 64 85 101 87 68 86 76 95 8...
result:
ok Correct matching.