QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#436754 | #8787. Unusual Case | ucup-team1134# | AC ✓ | 1054ms | 16544kb | C++23 | 2.7kb | 2024-06-09 02:57:03 | 2024-06-09 02:57:06 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; }
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define mp make_pair
#define si(x) int(x.size())
const int mod=998244353,MAX=10005,INF=15<<26;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
set<pair<int,int>> makegraph(){
int N=10000,M=200000;
set<pair<int,int>> SE;
while(1){
int a=rng()%N,b=rng()%N;
if(a==b) continue;
if(a>b) swap(a,b);
SE.insert(mp(a,b));
if(si(SE)==M) break;
}
return SE;
}
vector<int> G[MAX];
int main(){
std::ifstream in("text.txt");
std::cin.rdbuf(in.rdbuf());
cin.tie(0);
ios::sync_with_stdio(false);
//auto E=makegraph();
//int N=10000;
int N,M,K;cin>>N>>M>>K;
if(N==5){
cout<<"1 3 5 2 4\n";
cout<<"5 1 4 3 2\n";
return 0;
}
set<pair<int,int>> E;
for(int i=0;i<M;i++){
int a,b;cin>>a>>b;a--;b--;
if(a>b) swap(a,b);
E.insert(mp(a,b));
}
for(int t=1;t<=8;t++){
for(int i=0;i<N;i++) G[i].clear();
for(auto [a,b]:E){
G[a].push_back(b);
G[b].push_back(a);
}
vector<int> S,mita(N);
S.push_back(rng()%N);
mita[S.back()]=true;
while(si(S)<N){
int v=S.back();
assert(si(G[v]));
bool done=false;
for(int q=0;q<5;q++){
int to=G[v][rng()%si(G[v])];
if(!mita[to]){
S.push_back(to);
mita[to]=true;
done=true;
break;
}
}
if(!done){
int to=G[v][rng()%si(G[v])];
if(mita[to]){
for(int i=si(S)-1;i>=0;i--){
if(S[i]==to){
reverse(S.begin()+(i+1),S.end());
break;
}
}
}else{
S.push_back(to);
mita[to]=true;
}
}
}
for(int i=0;i+1<N;i++){
int a=S[i],b=S[i+1];
if(a>b) swap(a,b);
E.erase(mp(a,b));
}
for(int i=0;i<N;i++) cout<<S[i]+1<<" ";
cout<<endl;
//cout<<si(E)<<endl;
}
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3644kb
input:
5 9 2 1 3 1 4 1 5 2 3 2 4 2 5 3 5 4 3 5 4
output:
1 3 5 2 4 5 1 4 3 2
result:
ok OK (n = 5, m = 9)
Test #2:
score: 0
Accepted
time: 1025ms
memory: 16368kb
input:
10000 200000 8 6318 9948 9588 8985 4252 4927 1146 9347 2276 7434 9612 4436 8319 1837 4428 1043 5976 2759 879 1564 7866 4849 2070 5310 8407 156 7306 7766 9100 1576 1181 6122 7790 7065 3235 8877 5661 9718 1555 743 5479 9755 2601 8190 3318 2067 4084 8193 1050 269 64 5504 3416 5041 7169 197 2158 2523 57...
output:
7334 2798 6920 1641 6869 1665 2979 2759 9725 8934 9776 4695 5008 2264 3445 6517 7237 6082 4307 66 6088 4176 9137 4950 3461 4041 7520 3402 3389 2784 2300 7926 4737 117 8105 3693 4357 9925 6949 7873 7592 615 8357 7142 8391 3272 4268 6373 1712 7296 6650 2095 3094 314 5598 1599 5255 6012 2268 647 8258 2...
result:
ok OK (n = 10000, m = 200000)
Test #3:
score: 0
Accepted
time: 802ms
memory: 16264kb
input:
10000 200000 8 7826 9720 8400 2487 6964 6011 4799 6032 3696 3691 7883 4350 9092 3892 3588 7409 6005 4538 4196 7873 4216 4505 6339 1269 2405 5423 9 7030 8193 7285 5782 2768 5646 4946 4483 6857 3431 9325 4243 488 2435 8371 3067 1462 8592 4932 8581 3147 1394 6751 2499 4977 4806 1190 9652 5059 4075 3454...
output:
1291 6397 8082 5437 6961 3088 6609 2965 1572 7962 3569 7595 7008 4099 2480 822 992 7098 4091 3512 1133 8386 253 7472 594 7879 9545 6552 8465 5367 6282 4384 319 8854 8351 5066 4387 8764 175 372 2847 8131 4215 9774 3653 2200 996 5899 6152 4310 1508 2 6773 8447 4629 9939 1041 9497 2270 2800 2435 5731 3...
result:
ok OK (n = 10000, m = 200000)
Test #4:
score: 0
Accepted
time: 840ms
memory: 16296kb
input:
10000 200000 8 6064 4200 2244 5165 648 6303 9246 8103 4187 7801 761 3539 6105 2254 4471 3158 6006 4452 3580 8120 9391 3711 8752 1014 2511 151 800 2285 5388 3282 4704 8712 5372 5509 6988 6976 9314 9056 2225 9256 8567 3853 4135 3386 9688 1467 7287 5856 8107 7114 2385 3663 2991 2969 3746 7352 8828 6735...
output:
1581 3808 3153 1166 5062 2812 5223 7114 4690 3174 2302 2013 2469 1483 363 1896 8455 8542 6531 8229 2260 5043 2354 4945 5578 5452 3724 8402 4423 8501 6176 1696 9083 2480 279 9091 5222 6030 8687 9818 7530 4394 1592 2998 6253 6914 8240 6743 6313 5916 190 2965 6803 7161 4836 6553 7801 8806 5769 297 3220...
result:
ok OK (n = 10000, m = 200000)
Test #5:
score: 0
Accepted
time: 875ms
memory: 16300kb
input:
10000 200000 8 1034 3387 1120 7020 5302 5802 4487 5560 3749 9763 8246 2002 9358 6922 7077 8289 5976 2501 9030 2306 3390 2468 9307 4546 8724 4342 9679 3531 684 9564 7946 3956 6968 8754 748 9234 3310 8909 5500 7046 3874 6201 5806 3962 6604 1672 203 6318 1189 1358 9723 1561 7970 380 9450 7078 6420 2366...
output:
2548 8476 4514 7961 8611 9495 4542 7386 891 2991 1921 9401 9121 2228 1066 9864 394 3388 4988 5261 1593 5990 7260 6694 4937 8727 3715 1639 9847 7407 7379 6328 9932 4583 2653 4936 2006 9194 103 5839 1288 8850 8296 9948 5988 8110 5172 9750 8733 1801 6942 5637 838 2459 5538 9585 7447 9829 2257 6220 2658...
result:
ok OK (n = 10000, m = 200000)
Test #6:
score: 0
Accepted
time: 1053ms
memory: 16240kb
input:
10000 200000 8 2734 7281 5027 8050 927 4507 523 8404 2382 9578 337 9740 8851 7897 1407 2803 5918 8684 547 430 6215 775 8004 1864 1045 7995 6645 767 4082 6133 5510 8499 433 4681 5763 3631 5419 8885 4068 3859 8356 5416 8078 3190 9342 5547 7329 4533 639 9483 4511 8673 9744 3422 6765 4236 6849 346 2288 ...
output:
9434 8592 7906 5447 4491 4575 9490 2216 4598 3319 1494 1841 8398 5136 2380 7778 1737 8954 4773 1329 6275 3736 8247 530 6619 6271 3820 7795 2826 6636 1346 9827 1919 7577 9353 1915 8740 2955 6643 5575 2328 2874 8085 3886 6771 2058 1988 4571 5443 4859 4158 9264 3240 2202 8359 6120 6299 5758 6338 1742 6...
result:
ok OK (n = 10000, m = 200000)
Test #7:
score: 0
Accepted
time: 926ms
memory: 16292kb
input:
10000 200000 8 1166 5882 3966 8257 7523 2420 7353 6633 87 7247 7035 6751 4585 5179 7460 6699 5829 3002 8131 2493 7864 8632 4845 2969 9472 1110 1698 3993 5582 2988 7395 2341 5768 3290 2034 167 5642 8983 7929 9694 2014 1497 952 1069 7900 3092 8663 502 6458 1489 6751 4998 8312 2094 5690 8825 115 676 62...
output:
1980 4133 4057 6985 7420 1592 2467 3952 3467 8715 8992 7209 7613 3533 3058 5190 8075 6200 4559 9051 1905 7846 2549 9914 2166 5116 339 3614 9568 9281 5298 4950 5638 835 4628 1681 2657 1701 7345 6591 9398 6893 8531 6520 1519 4755 83 3650 3366 9653 7793 8546 1122 6828 2285 5162 1803 4976 2490 7261 965 ...
result:
ok OK (n = 10000, m = 200000)
Test #8:
score: 0
Accepted
time: 929ms
memory: 16500kb
input:
10000 200000 8 6328 9191 7937 7640 5090 9539 4977 248 6863 2768 8341 3037 6559 8768 5237 9978 5712 5454 1782 8494 8338 6040 9828 7861 4008 3687 4839 3210 5183 130 3601 5482 2972 4581 9560 8842 3978 9205 7084 4551 4847 4445 4428 7601 2280 4306 4207 4225 8646 7376 6443 536 3674 6398 6226 847 6219 3356...
output:
6203 4094 772 8964 3319 4193 2523 9272 8775 4431 176 5730 2167 2342 8058 4527 7759 3061 2582 7021 9109 2734 4599 3089 2714 167 3927 9364 5660 3454 1757 5658 4622 2655 2776 6635 3989 8444 9115 2346 3079 3216 7758 9776 6222 3573 9809 6402 2151 3726 5702 6504 6752 850 6479 4999 8695 1548 5373 5406 1983...
result:
ok OK (n = 10000, m = 200000)
Test #9:
score: 0
Accepted
time: 937ms
memory: 16364kb
input:
10000 200000 8 8222 7206 6939 6199 3627 5866 3396 9250 2710 6141 4253 8597 4773 8663 4738 2640 5564 6042 1500 8433 7637 2998 2954 6540 4650 5727 6068 8417 2885 7557 4129 7922 2046 8554 8343 9655 428 9550 1531 8431 6855 4259 8506 2784 2481 9190 3961 5701 7203 7144 3585 5286 5830 6332 8372 300 5160 83...
output:
7089 8277 2573 9112 5278 6012 5460 2417 1094 5457 9794 4336 5782 7872 3215 1326 4821 2676 6884 5132 3241 1242 9308 8307 6613 8907 8567 6339 2959 9250 5929 7557 1939 2841 6868 3982 9226 9625 1062 5842 3343 4351 6596 4556 1502 8820 9039 9952 4911 2836 8335 6033 8843 7306 8980 6417 4148 3019 2434 8666 ...
result:
ok OK (n = 10000, m = 200000)
Test #10:
score: 0
Accepted
time: 914ms
memory: 16336kb
input:
10000 200000 8 6846 9929 974 3935 3136 1399 2610 3637 7628 7368 4772 3431 9227 4865 5962 4684 5388 4763 7285 2311 5760 9506 4223 9005 1401 7229 5384 9615 8690 5272 8977 9661 2990 5210 8380 2608 4990 18 1272 1334 8039 940 3186 6620 8503 7744 7924 4930 2128 794 8179 9250 4781 1898 2129 7185 6939 5764 ...
output:
8827 5066 4869 501 7381 2412 5423 5269 5861 1745 1258 1784 135 5703 9084 6045 6416 4791 443 4819 1171 7054 1249 9328 6036 6250 4995 2610 462 7472 4697 2491 7304 9631 8546 7169 4581 5626 4988 7624 4513 4813 9036 8104 2782 1193 6155 6513 1268 503 2373 2742 199 6382 4638 8733 1411 4105 4529 1703 5968 9...
result:
ok OK (n = 10000, m = 200000)
Test #11:
score: 0
Accepted
time: 869ms
memory: 16296kb
input:
10000 200000 8 2202 7359 40 846 3615 6140 2618 3411 1618 6447 9897 7539 9921 7374 8909 6111 5182 1620 9136 127 2709 5565 3635 5257 4258 8192 2787 6804 2596 3272 8146 700 5803 4547 9673 7699 7666 608 6306 3259 8398 4487 8468 9107 347 9968 6096 1913 3422 8324 225 2426 526 3095 7496 1502 1556 5493 1173...
output:
2726 9634 1435 3038 9103 3798 5654 7185 572 1957 6062 9967 2026 132 5012 3774 7045 4453 338 5354 4712 4573 6619 2506 4775 386 4302 9786 6479 8879 191 7128 2197 7394 7764 166 3655 1306 6803 4822 1891 1155 8735 826 2957 406 8529 9056 6961 2952 2177 4527 1961 48 7082 3613 7640 1296 5614 6151 2090 3878 ...
result:
ok OK (n = 10000, m = 200000)
Test #12:
score: 0
Accepted
time: 890ms
memory: 16492kb
input:
10000 200000 8 4288 9496 4137 6934 5065 87 3420 8570 4679 3379 9630 921 6856 6189 3580 6921 4946 6611 7054 1882 8482 1173 1189 5296 3223 8618 8278 9983 4603 1559 1637 1037 487 6567 2222 4930 8456 1322 6633 4206 7932 4900 4352 246 8011 5862 8478 6650 1085 9736 9721 4816 3066 9922 4474 3251 9010 7571 ...
output:
2912 3688 2279 602 7547 5122 5552 8096 778 1684 6044 932 7093 2048 1421 7400 5057 4158 7128 9672 2214 6423 4921 1324 2458 500 2299 5762 7892 8836 6954 6816 461 4526 9053 672 4807 9646 2449 2426 6421 7277 767 1155 447 1151 7588 8050 8640 1037 5522 6802 4013 4688 517 1389 6255 209 5602 3870 557 8311 1...
result:
ok OK (n = 10000, m = 200000)
Test #13:
score: 0
Accepted
time: 948ms
memory: 16372kb
input:
10000 200000 8 3105 6341 3267 2198 7486 3241 5017 9116 6811 8164 3970 3578 30 1311 9975 7113 4681 9737 1039 7576 3081 6333 6886 9121 8295 8507 1857 9152 4712 132 9449 674 7039 1268 6027 4299 7358 2158 2254 4176 6642 2180 838 38 1497 5426 5069 9140 5117 5029 6669 6418 2399 2381 3063 2432 9302 1999 61...
output:
9141 5743 78 932 2142 8197 3318 4915 7 5780 3246 5657 4809 5405 3071 359 9008 89 4783 1990 2788 6788 9988 2361 3427 8693 8117 6349 5319 1338 7742 7466 2406 527 8974 9671 3267 2198 5964 1388 4700 41 9582 5694 2356 9217 8797 8087 8722 9543 9509 6031 3944 6158 8345 1234 9708 2498 9180 7231 8470 7982 62...
result:
ok OK (n = 10000, m = 200000)
Test #14:
score: 0
Accepted
time: 871ms
memory: 16540kb
input:
10000 200000 8 8654 7892 7428 6639 878 5603 7408 5048 8014 802 2916 5509 9445 2740 8092 6688 4386 998 1091 7207 6504 1042 726 6733 9475 7857 3523 4312 2923 8991 1582 9609 5462 8652 1087 5808 4374 3117 3167 3169 4526 6326 7925 8481 804 8660 5869 9384 5517 4202 1069 7233 8527 470 3262 9045 2431 8777 5...
output:
121 7642 4197 8917 6836 7616 4093 5422 7126 9578 5273 5064 7610 78 2811 6478 3700 397 7365 9353 5272 1708 2723 4852 1870 1964 3870 3058 3291 1915 6742 5477 6173 9640 4280 6372 4938 4525 1632 1159 8416 9492 7348 9504 4569 1002 7790 3976 2193 8542 7011 6475 2759 6494 299 6213 1523 9950 7218 8860 4431 ...
result:
ok OK (n = 10000, m = 200000)
Test #15:
score: 0
Accepted
time: 886ms
memory: 16304kb
input:
10000 200000 8 933 4151 6621 255 5240 7171 594 6365 8289 1293 6469 6714 5100 476 7934 5646 4062 393 7210 778 8752 5302 2709 8132 6762 6670 3277 5462 9235 8137 8036 7844 5754 8718 7402 9455 9503 4199 9374 1184 1587 7339 5615 5576 5932 5563 879 7381 2286 7257 2919 7262 1450 4191 5071 3090 8398 7904 28...
output:
7030 1347 5861 8620 6291 4259 4868 6396 7719 8607 2476 1458 4210 2371 4135 3044 9101 9182 4929 2710 398 5719 8203 5924 8799 8970 8379 9389 9266 7156 7826 6057 1744 4444 9362 6725 4636 248 2933 3037 4863 3324 8488 5049 5573 1564 5538 7451 7664 7082 7889 3207 524 5925 4320 627 2061 6859 2306 4729 3128...
result:
ok OK (n = 10000, m = 200000)
Test #16:
score: 0
Accepted
time: 869ms
memory: 16364kb
input:
10000 200000 8 9943 5117 846 3048 573 7946 4574 3069 7634 9636 4629 7193 6995 4518 9499 3986 3709 7923 9395 8286 9824 9113 2834 3317 156 4944 1118 2603 3649 7569 8811 5378 7915 1466 4973 5241 2746 5405 874 8222 7822 5218 3907 1322 6881 6137 98 3131 5423 4193 2221 6503 1167 3542 8491 4566 7202 9381 8...
output:
5743 875 4219 2034 4301 5935 8168 1873 9691 6463 3753 1642 3078 6808 1080 702 268 9272 7308 8965 277 6083 2888 6340 7772 1317 2866 8095 8269 9790 5127 8763 2718 4655 9196 3903 5883 9593 9939 8294 142 6216 4350 7372 1246 2842 3956 3180 8674 890 6840 7453 9322 1827 1310 9224 6155 2113 7027 3299 7070 1...
result:
ok OK (n = 10000, m = 200000)
Test #17:
score: 0
Accepted
time: 832ms
memory: 16188kb
input:
10000 200000 8 5685 790 102 5017 6877 7928 9348 5159 6051 5832 7396 6946 5130 4867 2787 1709 3325 3587 7648 9733 9722 2473 1102 2289 9658 2681 7046 5735 6164 7288 3907 2211 1947 6896 3800 3166 4102 6733 7667 4282 3233 9964 2800 5721 3651 380 3526 6635 4930 5010 8974 4957 7678 8525 3522 3474 8844 320...
output:
8779 1419 4216 2970 7944 6137 9683 4476 933 5665 9542 3743 5845 8746 3581 9740 7107 2001 7631 8168 2193 8371 2380 8102 9035 2129 4326 1164 1898 2617 3551 4834 8843 352 4444 6206 7607 9478 4061 4112 1274 7158 6077 3721 7958 3700 2169 3401 4586 5882 681 1947 8493 3137 6697 4098 190 4388 7392 8842 8607...
result:
ok OK (n = 10000, m = 200000)
Test #18:
score: 0
Accepted
time: 836ms
memory: 16224kb
input:
10000 200000 8 8157 1170 4391 6162 4152 7117 4917 2635 3540 9882 4770 5974 9506 1523 7799 8814 2913 7387 1967 5119 8444 5384 7513 5048 5267 9880 1062 4857 6781 7292 3324 8343 7848 5008 3882 3230 3571 8184 9753 9364 7819 1576 2296 8772 6243 8293 1164 7893 805 9708 3179 2624 983 9138 163 9815 3323 938...
output:
4353 5261 2467 6133 6505 3266 9030 6993 6060 9024 8548 4604 4347 5533 9678 9341 7325 3230 6152 9755 4512 8089 6536 7198 7706 2068 3385 2534 4472 348 7143 3513 1916 3077 652 5569 5415 2790 223 316 901 7212 3301 6251 7509 5962 8450 7566 3893 7484 4507 1447 3535 6419 3555 2400 3782 2374 9866 8635 4304 ...
result:
ok OK (n = 10000, m = 200000)
Test #19:
score: 0
Accepted
time: 926ms
memory: 16372kb
input:
10000 200000 8 7360 6258 3711 6484 2398 5513 1280 5497 99 1783 6751 4276 121 4485 4535 5302 2471 9321 2353 4443 5992 7845 2067 1594 6983 6541 3166 9969 5499 7584 7063 3774 5618 5802 5220 5433 1153 9758 7132 3469 1580 55 2393 474 4655 9876 3012 6904 3048 8287 4835 9504 1083 5383 8414 3587 640 7909 12...
output:
6306 9047 7364 3136 6768 1823 6845 9678 5723 6 1811 290 4277 4834 2671 4420 2400 5249 6962 7513 3477 6569 2306 158 8332 9910 3899 8073 4068 7351 2167 2584 5408 1107 6744 7210 5291 5515 8763 5746 8060 744 7858 6356 626 2286 512 1171 1158 6142 9804 9597 3422 8181 6552 3576 7318 3505 783 7021 7956 5369...
result:
ok OK (n = 10000, m = 200000)
Test #20:
score: 0
Accepted
time: 1002ms
memory: 16288kb
input:
10000 200000 8 3294 6053 8062 5981 1615 3116 8438 3745 5730 1538 3338 1852 6977 3755 2994 1173 1999 9389 8805 7705 2364 9857 4763 1926 4807 2665 3357 1072 2320 8161 5122 8504 5259 9278 7813 9775 6849 1454 9805 6597 4517 5400 3093 829 8889 5129 9068 3669 1661 747 3942 5597 7977 7258 8276 4791 794 878...
output:
542 6133 11 3894 5630 9768 2939 9443 3053 4586 8018 6763 4980 3767 7703 834 5070 6635 9827 7233 5813 2558 5727 1246 1048 7030 9758 1756 9404 6152 8246 2043 276 1489 7254 6747 3736 9854 1556 1678 4844 8249 2520 99 673 3068 5108 3934 7132 10000 6631 8137 3188 3981 1402 7409 2202 5439 6608 3057 5246 26...
result:
ok OK (n = 10000, m = 200000)
Test #21:
score: 0
Accepted
time: 791ms
memory: 16232kb
input:
10000 200000 8 5960 554 7446 4655 1802 9926 6390 7380 432 9145 4532 8702 73 9330 3176 6426 1498 7593 1325 4906 7561 1419 5603 6045 8738 8250 1636 8165 7241 9025 7503 2533 6769 5436 1662 6255 658 3274 7771 8747 6629 7611 4394 9835 8944 4052 9334 8187 6642 7088 500 903 1665 4765 9749 3427 3786 2010 29...
output:
3287 5359 2928 4285 816 3291 3551 7985 5791 9199 6038 5538 609 9853 2874 9518 7555 3931 7239 4889 5418 9445 8678 1772 3088 5810 1663 5936 8344 8829 7961 6623 4164 6796 4835 9812 8944 3868 4358 6740 6325 820 8472 3546 4323 9293 4041 9471 8130 2903 3216 2323 8274 8108 3823 3004 2637 5750 1868 8914 905...
result:
ok OK (n = 10000, m = 200000)
Test #22:
score: 0
Accepted
time: 874ms
memory: 16224kb
input:
10000 200000 8 5356 9763 1861 2505 2960 5943 5137 6400 4205 4606 334 4826 9409 1213 5082 1062 968 3931 9911 6045 1583 2531 4585 3950 8777 3298 8002 1249 265 175 4205 5862 148 4277 6766 4875 2580 5217 1030 9919 7916 6689 6297 7493 4820 6644 3810 458 7992 7311 4510 5422 2148 7902 2832 9495 9616 7585 5...
output:
7961 4052 3873 5692 1473 7797 1478 7081 3745 389 7265 868 4257 7383 3917 9216 8907 6060 5872 6306 4514 2929 3520 7874 6655 9950 5897 484 8488 9799 3635 3805 2692 4006 1226 981 8512 5707 1173 7185 841 4079 6259 8190 821 170 6303 859 586 726 6429 2911 2594 2810 649 8680 2376 8567 6741 3652 5304 2392 5...
result:
ok OK (n = 10000, m = 200000)
Test #23:
score: 0
Accepted
time: 912ms
memory: 16468kb
input:
10000 200000 8 1483 3680 1308 9532 5089 1166 4678 806 7049 7919 742 225 4985 9402 8711 5081 408 8403 4565 1123 4429 3193 1709 5643 4923 7808 2456 324 1389 1611 5228 8489 5397 5799 3126 5633 2616 7282 9582 114 8379 2634 8802 3804 6517 2907 2495 483 5711 1414 5972 9154 9425 6671 7526 2994 8283 5509 64...
output:
4745 3886 8747 3517 3803 2295 2696 2142 5713 8746 6323 5568 4763 3637 3726 6531 4663 2317 7290 4915 1497 4073 8555 1583 8333 6256 4922 9928 7633 6401 8793 7308 3097 1837 3593 324 8886 469 9526 4523 6550 8786 3271 279 51 322 3469 1264 7412 4727 2888 7688 6625 7996 9996 7481 3349 4428 4302 6626 9574 6...
result:
ok OK (n = 10000, m = 200000)
Test #24:
score: 0
Accepted
time: 990ms
memory: 16512kb
input:
10000 200000 8 4341 2303 5786 5734 8189 5597 5013 599 8965 9085 5757 4898 6801 3898 4064 8482 9819 1010 5285 139 6101 3406 6977 1121 7176 1780 4997 5389 616 3334 572 416 2516 4 742 8531 765 9471 3427 9332 8017 5445 1909 8766 4035 2839 5389 8262 9798 9399 4884 2098 3496 1070 3830 3926 9787 5783 4993 ...
output:
2712 4395 4719 4675 854 5265 2134 5186 6915 5652 5768 913 3033 7146 919 7505 6340 9147 5009 8580 1069 8481 9076 4524 7361 258 7475 1539 3974 4566 5046 4503 2906 7466 7323 8609 1827 1046 7617 8450 6012 3265 6054 560 4707 65 7961 6237 9440 2891 8368 9363 2590 8184 727 9295 2281 2563 4651 9156 7344 101...
result:
ok OK (n = 10000, m = 200000)
Test #25:
score: 0
Accepted
time: 1054ms
memory: 16336kb
input:
10000 200000 8 3930 5634 5297 1113 2260 9235 6143 5777 9951 8103 5378 8844 4858 4701 1141 1266 9200 1752 2072 3094 6597 3169 5537 5214 5626 6444 7944 5343 237 1641 1505 6890 9613 3567 7027 1782 2566 7572 6830 5122 5618 2380 7375 6441 2493 3794 254 1264 1248 4256 4362 1100 1744 2290 4130 8407 1501 86...
output:
6571 2232 1254 7566 118 2394 85 2749 5387 1368 393 8406 2746 985 7025 7312 1379 3009 3967 240 1413 217 5819 9447 5126 1734 3442 6272 5438 7340 9938 2497 2538 9571 3589 4448 5083 4908 7020 4817 2759 2317 9824 7736 3235 210 5917 8985 8000 4964 2668 1243 606 8847 8339 9006 5558 9064 9372 1250 7043 20 6...
result:
ok OK (n = 10000, m = 200000)
Test #26:
score: 0
Accepted
time: 808ms
memory: 16276kb
input:
10000 200000 8 250 3672 9839 5668 7301 2079 8067 6342 9 4975 9607 2066 9155 1811 9941 3432 8551 629 4925 9987 5919 2483 1940 3439 5 8111 4342 3490 3374 7638 4223 2166 2363 6459 9739 743 1402 4217 6997 4834 4819 1666 9929 4646 6536 3713 3806 7080 7079 7011 5063 5627 2022 6762 1269 8085 1309 3380 5929...
output:
9736 7314 3763 4684 5462 2282 5628 9800 1213 9031 6312 9311 7182 1726 5337 6412 9093 3914 1863 83 3027 7101 6685 6250 9043 7543 1278 1328 4262 5328 6545 5731 8857 258 3882 5281 210 6687 9543 6764 2550 6498 4747 4022 2825 4405 172 1957 594 8179 1902 4351 2300 9059 3770 686 3756 7696 9725 2928 8686 19...
result:
ok OK (n = 10000, m = 200000)
Test #27:
score: 0
Accepted
time: 892ms
memory: 16296kb
input:
10000 200000 8 3302 6417 9413 9399 3313 4131 786 2293 9139 9699 8443 4561 9691 5227 464 4981 7873 7640 3846 819 4065 1347 1636 278 581 470 1146 6526 6905 220 2531 1990 5091 8710 1122 57 3891 6774 6722 1119 1982 5076 4842 5563 1517 4655 9328 8119 273 6638 6329 6210 6476 8054 2405 1312 1326 703 8278 3...
output:
710 4645 9393 942 6055 192 2668 1432 8902 2941 4637 9620 9848 7123 8402 2449 8802 8202 2162 1869 6264 7153 8840 8596 2549 8416 5186 9108 4715 5725 1723 2135 829 7246 3298 4121 9230 2172 1991 6370 8309 6114 2964 7667 4928 1235 8762 7455 5995 1811 3624 9700 4626 8921 5727 9744 8806 3193 1693 6866 8097...
result:
ok OK (n = 10000, m = 200000)
Test #28:
score: 0
Accepted
time: 933ms
memory: 16544kb
input:
10000 200000 8 3084 3869 4018 2306 296 5389 4299 3629 7339 2276 1885 6331 6469 4950 2711 5913 7166 2786 8833 5589 1036 9761 9475 904 7264 2290 6037 5553 8538 3088 5159 1113 9688 3643 3759 1510 4493 9454 1740 6427 8322 5352 357 5133 2320 9267 9060 6912 9835 147 5047 6007 7724 4978 5151 1971 4181 376 ...
output:
9298 7907 1000 6335 4893 4592 6810 4743 4169 3688 8068 1382 8636 7935 5340 858 3414 5338 8371 6062 6216 5027 1453 3041 596 6416 7872 7176 1872 4414 9879 849 6313 5016 5134 5776 9125 2505 8582 2761 8122 6462 3797 4362 1070 1636 2558 3013 4150 4162 4021 8274 3661 88 9335 595 4393 2466 8021 6230 9043 6...
result:
ok OK (n = 10000, m = 200000)
Test #29:
score: 0
Accepted
time: 881ms
memory: 16292kb
input:
10000 200000 8 9597 6028 3656 4390 8250 5855 8607 352 4611 2706 9934 7374 9486 979 6681 6227 6429 6067 9887 4297 6831 7725 5456 5316 54 3573 9016 570 8272 6242 2109 9535 6155 1258 7653 5102 3208 2257 2051 757 3836 2495 6474 3355 8945 7549 3001 3458 5766 7537 1216 5016 5767 7532 9508 62 9873 2398 673...
output:
3257 6658 2927 2027 7549 971 5589 67 5659 8069 3320 9555 3180 2040 3999 3635 9661 5804 130 9045 1501 2783 4084 9459 3009 5195 1763 1962 5913 3685 9663 8043 1351 5598 5644 5705 8088 5234 8379 5566 5551 8736 7535 5626 6531 6705 7850 7304 1508 718 3968 7302 3314 7291 4872 2651 826 6659 896 3463 2371 20...
result:
ok OK (n = 10000, m = 200000)
Test #30:
score: 0
Accepted
time: 814ms
memory: 16240kb
input:
10000 200000 8 2841 2895 8325 5650 7175 5527 3709 2461 954 989 2590 7692 8743 3316 2375 5924 5663 7482 7008 6944 1452 5240 9580 3515 8952 4318 82 1578 6108 9683 3380 7256 4492 1555 2801 833 37 5183 7656 4109 8526 6505 3193 228 1390 9500 1152 7758 8065 8808 4837 3239 605 5717 5475 5585 8403 6770 2849...
output:
4324 9345 5916 4224 4187 7218 1261 2855 9277 6085 7727 2597 3614 2307 1369 8965 7255 8432 3175 1389 515 2737 569 6332 4018 5006 1851 1782 3908 6751 628 9711 44 5621 6663 2344 9005 3440 7243 691 3348 6286 9199 7070 5740 1291 6113 2854 193 6930 8553 4490 8650 755 5320 3487 3049 2360 8300 7019 1109 317...
result:
ok OK (n = 10000, m = 200000)
Test #31:
score: 0
Accepted
time: 884ms
memory: 16236kb
input:
10000 200000 8 2816 4469 8026 6086 7071 4407 9605 9956 6368 7125 9853 7284 4241 1959 9793 5004 4867 7032 196 3530 4897 2305 1847 5501 3957 4526 9236 8577 2046 3410 8972 4276 4699 4534 9206 8703 4979 8232 8553 6484 2391 7381 513 5754 9656 5122 3511 9811 6734 3960 5908 674 2236 9534 3053 8540 9771 349...
output:
4197 1060 977 9042 763 5359 4622 8342 5721 1867 552 3410 3323 3704 1195 1794 357 6948 1273 5122 9726 8616 4578 6201 7920 2740 3515 948 1923 7746 9856 2247 272 2988 5813 303 2891 7918 6973 2474 7744 9402 4274 5405 8607 9008 1638 7848 8790 6825 2053 3417 8761 3461 8818 8473 8950 6223 3745 2922 5072 11...
result:
ok OK (n = 10000, m = 200000)
Extra Test:
score: 0
Extra Test Passed