QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#682500 | #8787. Unusual Case | i_am_noob# | AC ✓ | 183ms | 11592kb | C++14 | 2.9kb | 2024-10-27 15:45:28 | 2024-10-27 15:45:28 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using pii=pair<int,int>;
#define sz(a) ((int)a.size())
#define pb push_back
#define all(a) a.begin(),a.end()
const int N=200005;
int n,m,k;
vector<int> adj[N];
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
void del(vector<int> vec){
for(int i=0; i<n-1; ++i){
int u=vec[i],v=vec[i+1];
bool flag=0;
for(int j=0; j<sz(adj[u]); ++j) if(adj[u][j]==v){
adj[u].erase(adj[u].begin()+j);
flag=1;
break;
}
assert(flag);
flag=0;
for(int j=0; j<sz(adj[v]); ++j) if(adj[v][j]==u){
adj[v].erase(adj[v].begin()+j);
flag=1;
break;
}
assert(flag);
}
}
signed main(){
ios_base::sync_with_stdio(0),cin.tie(0);
cin >> n >> m >> k;
for(int i=0; i<m; ++i){
int u,v; cin >> u >> v; u--,v--;
adj[u].pb(v),adj[v].pb(u);
}
/*
int n=10000,m=200000,k=8;
set<pii> st;
for(int i=0; i<m; ++i){
int u=rng()%n,v=rng()%n;
if(u>v) swap(u,v);
while(u==v||st.count({u,v})){
u=rng()%n,v=rng()%n;
if(u>v) swap(u,v);
}
st.insert({u,v});
adj[u].pb(v),adj[v].pb(u);
}
*/
{
int mn=1e9;
for(int i=0; i<n; ++i) mn=min(mn,sz(adj[i]));
//cout << mn << "\n";
}
vector<vector<int>> ans;
for(int _=0; _<k; ++_){
vector<int> res;
{
int s=0;
for(int i=1; i<n; ++i) if(sz(adj[i])<sz(adj[s])) s=i;
res.pb(s);
bool bad=0;
for(int i=0; i<n; ++i) if(i!=s&&sz(adj[i])<=1){
bad=1;
break;
}
if(bad){
ans.pop_back();
_--;
continue;
}
}
for(int i=0; i<n; ++i) shuffle(all(adj[i]),rng);
vector<int> vis(n);
vis[res.back()]=1;
while(sz(res)<n){
int u=res.back();
bool flag=0;
for(auto v: adj[u]) if(!vis[v]){
vis[v]=1;
res.pb(v);
flag=1;
break;
}
if(flag) continue;
shuffle(all(adj[u]),rng);
for(auto v: adj[u]) if(vis[v]&&(sz(res)<=1||v!=res[sz(res)-2])){
int j=sz(res)-1;
while(res[j]!=v) j--;
reverse(res.begin()+j+1,res.end());
flag=1;
break;
}
assert(flag);
}
ans.pb(res);
del(res);
}
assert(sz(ans)==k);
for(int i=0; i<k; ++i){
assert(sz(ans[i])==n);
for(auto j: ans[i]) cout << j+1 << ' ';
cout << "\n";
}
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 8380kb
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 4 5 2 1 4 2 3 5
result:
ok OK (n = 5, m = 9)
Test #2:
score: 0
Accepted
time: 161ms
memory: 11592kb
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:
2912 5440 4511 9816 837 2196 1621 8695 171 7518 8633 9253 826 6196 8657 5190 1033 7009 5557 8309 8031 4873 9441 1545 5971 9036 7281 8737 7483 4344 5782 8822 1032 6313 9038 3666 6530 6016 4657 1264 8326 9245 8904 3800 4127 6879 9617 9545 9381 1639 9619 4697 8715 3108 6917 71 4426 9836 7974 5753 2177 ...
result:
ok OK (n = 10000, m = 200000)
Test #3:
score: 0
Accepted
time: 183ms
memory: 11356kb
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:
5373 1002 1311 2740 317 4151 8443 7878 2249 324 5461 1425 7486 448 394 4375 7401 4885 7761 7608 6420 8984 264 4834 1120 9431 8352 9585 140 2795 2489 6965 3420 6937 5382 1830 8042 6098 7842 1670 919 8698 8373 3249 9527 9676 3835 2183 8943 9996 1756 5390 4169 126 1672 5425 2164 5422 5526 4017 9854 159...
result:
ok OK (n = 10000, m = 200000)
Test #4:
score: 0
Accepted
time: 142ms
memory: 11424kb
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:
4633 3855 4043 5914 7455 3327 641 9655 5368 4328 2740 1976 3903 6681 7315 5027 1060 9663 6056 5988 7402 1606 4902 3812 771 9798 8906 7747 194 3864 139 4189 5844 5736 7366 6298 6938 2492 6834 3932 35 3171 8252 3086 898 1386 6293 3960 8447 9612 4068 5491 9431 8112 2586 6380 1229 4142 1800 3612 1658 95...
result:
ok OK (n = 10000, m = 200000)
Test #5:
score: 0
Accepted
time: 174ms
memory: 11488kb
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:
6968 4465 7257 8936 995 518 1235 57 5376 8477 5853 8782 2102 8873 6851 930 3839 7422 5129 3173 8023 6409 2303 100 6437 813 7664 2149 9391 9042 6920 3281 9959 3325 888 1514 9420 2531 6887 7880 4216 5387 6279 1959 4683 407 5885 7637 2523 728 3584 9630 1595 4380 7732 5418 8310 731 3521 7274 5201 9406 3...
result:
ok OK (n = 10000, m = 200000)
Test #6:
score: 0
Accepted
time: 174ms
memory: 11544kb
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:
5827 2621 6511 6889 9062 439 7966 5407 4362 3670 5340 1396 1237 8825 5520 798 6357 6270 3397 742 5816 6953 6678 2073 5536 9674 2072 6319 9833 8873 6530 196 1523 4480 78 9238 4674 253 3457 1996 4758 792 7805 2302 5722 4272 8429 5418 1295 8027 3818 2883 9921 712 7622 8334 2458 2286 8985 8288 9242 1070...
result:
ok OK (n = 10000, m = 200000)
Test #7:
score: 0
Accepted
time: 147ms
memory: 11340kb
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:
265 6627 9324 4103 7223 151 6848 3636 4498 4740 8067 7811 4699 2564 8490 3061 4 11 8564 5755 2570 2864 6725 2097 8557 938 690 4632 1936 4381 2442 8454 2372 4294 326 683 9934 2852 637 5079 9519 3926 4072 1282 1778 4758 5289 9031 6927 4277 9272 7867 4142 2397 25 8043 1347 6858 9108 812 6473 1700 5412 ...
result:
ok OK (n = 10000, m = 200000)
Test #8:
score: 0
Accepted
time: 126ms
memory: 11536kb
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:
1638 3902 368 2068 5335 334 4012 2254 5086 425 5368 9514 6500 7815 3959 9622 675 7240 7544 6855 6362 1626 8354 4662 2804 6488 5450 5165 2044 6363 5820 7946 6953 1931 9143 8860 4734 8617 8452 4827 555 9793 4946 2058 3250 5903 7506 3496 6411 8923 5668 2845 1889 163 9356 5023 6175 1987 6345 7249 5906 2...
result:
ok OK (n = 10000, m = 200000)
Test #9:
score: 0
Accepted
time: 171ms
memory: 11360kb
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:
1545 8945 1641 3510 8444 129 38 5247 7476 5473 9376 9 7598 1134 758 6818 5460 5360 5658 1538 3147 7620 3812 1619 8563 1640 5716 820 1116 5390 4920 4000 6320 5580 7153 5540 3641 6632 9492 2297 7766 6570 1597 3705 7567 9517 8556 3022 8528 6633 9899 501 7205 4623 8160 4327 2324 6564 5662 2076 8546 2843...
result:
ok OK (n = 10000, m = 200000)
Test #10:
score: 0
Accepted
time: 171ms
memory: 11556kb
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:
4689 2775 1341 5244 5604 1239 3093 2703 8631 9724 4381 7462 5503 2796 2119 3234 1426 4524 1126 6710 6635 3689 9917 8322 3320 3903 4938 5047 6072 9481 518 1752 4846 6297 3774 8352 5051 8786 4787 2592 8816 7126 2962 2451 2993 4939 8033 5588 2249 5659 3966 5802 633 3810 6586 7728 3034 3309 3802 2114 61...
result:
ok OK (n = 10000, m = 200000)
Test #11:
score: 0
Accepted
time: 146ms
memory: 11288kb
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:
4802 9255 2647 8215 9195 6198 578 4287 1458 2448 2930 6255 9273 5963 8025 9674 4284 453 7079 3246 7378 8836 4503 5023 6527 7158 3222 3600 3672 2207 7918 5217 351 1556 7725 4351 1587 4408 1961 891 5754 7096 648 3983 2993 4207 5863 3530 2760 3987 832 5576 793 4150 6625 8633 4163 621 130 4572 3537 3839...
result:
ok OK (n = 10000, m = 200000)
Test #12:
score: 0
Accepted
time: 161ms
memory: 11556kb
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:
3394 5430 3188 4634 7886 1164 4561 6244 4551 8106 2000 6286 6473 4985 6466 303 3467 6804 5489 4003 4867 1408 7320 510 8237 4464 6065 7204 5399 2624 9907 2665 7873 484 7974 8408 5204 6506 1111 3239 1473 1331 8515 3622 994 6508 8328 1168 503 1600 2891 6369 43 2386 5041 1376 6036 6198 7788 345 1510 444...
result:
ok OK (n = 10000, m = 200000)
Test #13:
score: 0
Accepted
time: 148ms
memory: 11316kb
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:
4622 1131 2550 3447 3437 4314 3008 8930 8822 7328 4127 1533 3229 6378 9224 2456 1172 9887 7417 820 2801 9637 7042 8240 8404 5346 851 3090 4937 9534 8913 6114 8422 9106 200 1531 6634 7105 3160 3429 7516 4601 7286 9949 1252 6572 6940 4102 4492 7396 485 298 4396 7894 4218 6065 4242 8886 2429 4486 3402 ...
result:
ok OK (n = 10000, m = 200000)
Test #14:
score: 0
Accepted
time: 143ms
memory: 11392kb
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:
7425 3130 6911 5944 4448 701 1573 2308 842 3471 4487 4141 4397 3515 5202 4436 5844 6236 2905 1978 232 3230 2387 2997 8327 3522 9274 5769 2937 9026 6243 3131 534 550 4815 517 5364 4844 6197 3356 6759 6123 7446 2940 2662 636 3390 5893 13 3857 9306 3613 4678 1359 7990 3000 7707 188 8106 9875 4623 7242 ...
result:
ok OK (n = 10000, m = 200000)
Test #15:
score: 0
Accepted
time: 161ms
memory: 11400kb
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:
5864 4127 836 3988 2219 4856 6187 1251 2360 6724 9287 7931 9265 4630 8399 3145 6581 135 3199 9146 8280 5483 9113 2323 9342 9386 3490 1885 8106 4149 3016 1736 2527 6253 9391 4944 7277 2339 3678 5670 2515 38 126 3433 2600 3969 8824 5162 6778 9154 1256 5835 214 8610 2230 1777 2076 9469 7333 8301 8761 4...
result:
ok OK (n = 10000, m = 200000)
Test #16:
score: 0
Accepted
time: 137ms
memory: 11588kb
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:
2125 6537 2603 4193 1855 1038 6236 3569 2877 1559 6668 9511 8072 8611 3291 8283 1843 5016 5298 8832 3656 303 7622 6207 2422 7896 7212 7221 2810 7160 7386 537 763 1844 6150 6628 6530 6042 1134 6899 722 4265 9734 7012 8356 8288 9125 4271 6946 4950 8833 1224 7223 3021 6441 6366 7357 8219 2755 7746 8635...
result:
ok OK (n = 10000, m = 200000)
Test #17:
score: 0
Accepted
time: 157ms
memory: 11380kb
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:
5524 9518 7841 2649 5201 9662 5730 2488 7362 5156 8939 7111 767 4942 2559 6973 6750 5746 178 6582 8158 7437 5703 9874 7920 8281 6274 83 2601 5608 8759 4723 5522 5797 349 702 4395 8535 4476 7395 9372 9427 9967 94 5350 682 7548 2243 7965 2472 3824 8489 6088 3864 4339 3173 5181 7561 5509 4605 6431 256 ...
result:
ok OK (n = 10000, m = 200000)
Test #18:
score: 0
Accepted
time: 148ms
memory: 11336kb
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:
131 4782 621 160 4544 1766 7515 2612 7689 8230 9813 1153 4385 121 7478 7035 4160 2655 1475 6957 5098 475 2586 8131 7413 6464 1100 5330 5990 9413 5659 2529 8135 613 6170 3291 1634 3846 6125 9866 2686 6502 3517 9394 321 2524 460 5321 1807 3843 235 5263 427 6933 5801 2478 2532 4517 8305 889 8841 4288 8...
result:
ok OK (n = 10000, m = 200000)
Test #19:
score: 0
Accepted
time: 149ms
memory: 11552kb
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:
6302 7767 3030 7788 8753 5867 8609 8648 9109 6473 2970 2629 3991 1012 7893 6998 8141 7389 2435 4931 7024 8871 1370 822 431 4152 8374 3522 7355 6539 2867 3718 5527 5877 6706 18 819 9961 54 2147 7865 6756 7466 7745 3575 9325 3329 9289 8153 2296 3591 8960 5037 89 8836 5058 9893 9098 3899 9910 8332 3308...
result:
ok OK (n = 10000, m = 200000)
Test #20:
score: 0
Accepted
time: 139ms
memory: 11480kb
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:
6237 3333 2874 6212 760 224 782 6149 1527 2471 4448 5752 1879 8497 6380 7667 1996 6536 8693 9814 1977 3132 5609 1823 4291 2203 7541 3420 3483 1319 8342 5168 9426 1380 6777 322 2574 8824 2927 6182 850 8987 4595 915 4542 4102 5045 1855 9114 2922 164 1863 4020 3868 5998 1260 5029 296 5904 5157 3739 414...
result:
ok OK (n = 10000, m = 200000)
Test #21:
score: 0
Accepted
time: 160ms
memory: 11392kb
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:
9320 223 2122 8387 6487 1031 6866 3625 7388 3232 714 5435 193 9980 4026 7924 2199 2064 9202 7451 1633 8627 2914 3462 449 4870 4293 3336 1213 6289 5615 8981 9321 8637 6621 4838 2010 2966 1653 4230 4571 647 925 7142 6948 7248 1303 2240 2066 4528 4458 680 3689 3318 8628 1917 5593 3911 4722 6506 6720 45...
result:
ok OK (n = 10000, m = 200000)
Test #22:
score: 0
Accepted
time: 150ms
memory: 11304kb
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:
5604 429 9431 3856 852 1206 6968 7880 6763 1182 2403 2440 5706 6529 87 9322 3261 7583 293 9388 7514 4014 9640 423 5570 4046 5076 3471 4425 6505 5130 9206 2090 177 1787 5718 3636 8934 7309 9262 2346 8981 4092 1564 9084 8367 6629 3457 5452 9922 3089 8205 2394 3490 5871 7942 7170 3528 1992 9075 1820 71...
result:
ok OK (n = 10000, m = 200000)
Test #23:
score: 0
Accepted
time: 155ms
memory: 11372kb
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:
6276 7906 2225 8432 546 7335 4483 8720 6520 6536 5812 8656 4120 9956 94 1652 6150 5085 9619 3397 8078 7986 3787 6917 7332 7145 4516 2229 3491 5127 7340 3392 4658 2439 5388 2330 5000 2423 66 5893 8905 9448 2948 6828 2279 394 5110 8798 8849 4126 2804 1372 4423 8438 6135 1471 1055 5477 6756 6069 7850 2...
result:
ok OK (n = 10000, m = 200000)
Test #24:
score: 0
Accepted
time: 152ms
memory: 11320kb
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:
822 5305 7269 2059 2601 2439 3942 4795 6588 6598 9025 9245 5261 342 8038 6893 9597 3159 8699 6945 4197 7057 7471 5273 2092 8935 7049 7882 5344 8245 6384 8511 8062 149 283 7134 9372 4450 69 1906 357 5412 1806 8852 3370 8439 9318 5609 2584 6307 5935 2667 6456 4411 3171 5159 6896 5758 6249 2133 6719 60...
result:
ok OK (n = 10000, m = 200000)
Test #25:
score: 0
Accepted
time: 140ms
memory: 11312kb
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:
593 615 883 3723 3262 2641 7338 540 7586 9953 8870 1829 9114 8208 6103 8374 8669 3349 4515 8928 7669 361 6464 2723 961 8691 9550 5741 7627 6214 3176 9392 5450 4146 5177 2726 6561 1648 816 4826 8300 7291 9923 1153 7777 2001 1074 6719 9795 2614 209 3827 1658 6332 6244 2816 8466 1628 9858 8768 5426 863...
result:
ok OK (n = 10000, m = 200000)
Test #26:
score: 0
Accepted
time: 126ms
memory: 11552kb
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:
2158 7057 3958 8903 1752 8243 9210 5173 2061 6585 9596 6780 9182 2778 6351 8616 2062 7000 3447 8733 7544 9284 8689 9013 5106 11 6588 8859 2897 9812 6408 9633 9671 4084 5612 3775 3070 4128 1807 8591 5525 1676 3200 2932 9544 1099 4794 5330 9880 5213 2741 8825 8952 115 3777 6669 3722 1423 2397 7656 335...
result:
ok OK (n = 10000, m = 200000)
Test #27:
score: 0
Accepted
time: 162ms
memory: 11328kb
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:
3490 5854 4989 4822 3791 6438 8089 1164 9533 5051 2842 6483 5737 1616 6830 876 7665 2298 3812 868 6262 9299 2750 4511 7433 9238 3930 8006 772 409 6499 7564 56 1377 4289 3110 6785 8082 9575 2100 7757 3245 9663 5066 9722 1355 5325 8879 5254 108 1840 4929 6123 4431 5292 2352 2033 2218 8292 9007 594 783...
result:
ok OK (n = 10000, m = 200000)
Test #28:
score: 0
Accepted
time: 157ms
memory: 11556kb
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:
3299 8787 3398 5221 9746 6617 2190 333 3328 1856 9158 5383 8502 9264 6627 9681 6707 5697 9688 3858 2192 5396 8992 48 9614 2066 7938 1187 8710 1068 7454 7503 1239 9968 1204 9479 6758 1728 4769 9700 3491 5962 2469 7734 6286 3320 5960 3349 2796 4930 5131 7322 6870 75 9993 7208 6571 4697 6187 2779 2729 ...
result:
ok OK (n = 10000, m = 200000)
Test #29:
score: 0
Accepted
time: 148ms
memory: 11248kb
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:
2531 4944 6775 293 3675 2757 2302 4724 6045 3332 860 3818 3442 7740 9985 2673 3461 8083 3885 4586 675 2331 4720 9825 4534 6130 8145 9273 640 3623 6025 6498 6267 8257 1898 4982 8166 2928 9969 6715 7679 8878 1929 9442 2642 4906 6574 8849 9898 1490 6347 8731 1363 9757 8142 2603 5410 5870 4713 8375 8267...
result:
ok OK (n = 10000, m = 200000)
Test #30:
score: 0
Accepted
time: 149ms
memory: 11300kb
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:
1231 9625 7734 3803 2907 1479 4512 492 6436 6185 2712 5339 6254 808 1731 146 2231 493 568 1001 8396 991 9243 1103 3500 3376 8157 3793 501 5884 6754 7805 1812 8930 4896 6658 5881 3408 1892 6655 3066 7607 2128 723 8363 1079 6621 4216 6915 735 7309 9845 3092 7104 9667 4802 8688 825 3961 3411 1427 7281 ...
result:
ok OK (n = 10000, m = 200000)
Test #31:
score: 0
Accepted
time: 146ms
memory: 11336kb
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:
3134 4401 1666 1994 9180 6116 4661 6886 2774 2744 5633 2008 1603 7896 9794 4824 4324 6455 5962 4807 9124 1438 8288 7531 3817 2310 3410 2486 4852 7039 9462 1287 4700 2035 4519 8725 3749 830 8099 9302 1905 2566 8134 1320 8575 1091 7436 6553 1197 5869 2842 6245 3554 7265 4343 9362 2676 2685 1488 2195 2...
result:
ok OK (n = 10000, m = 200000)
Extra Test:
score: 0
Extra Test Passed