QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#191649#880. Film CriticsZhouShangAC ✓55ms10292kbC++14566b2023-09-30 06:30:102023-09-30 06:30:10

Judging History

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

  • [2023-09-30 06:30:10]
  • 评测
  • 测评结果:AC
  • 用时:55ms
  • 内存:10292kb
  • [2023-09-30 06:30:10]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int n,m,k,A[1<<20],s,l,r,x;
pair<int,int>p[1<<20];
int main(){
	cin>>n>>m>>k;
	if(k%m!=0||k==0)
		cout<<"impossible\n",exit(0);
	k/=m;
	for(int i=1;i<=n;i++)
		cin>>x,p[i]={x,i};
	sort(p+1,p+n+1),l=n-k,r=n-k+2,A[1]=p[n-k+1].second,s=1;
	for(int i=2;i<=n;i++){
		if(l&&s*m>p[l].first*(i-1)){
			A[i]=p[l--].second;
			continue;
		}
		if(r<=n&&s*m<=p[r].first*(i-1)){
			A[i]=p[r++].second,s++;
			continue;
		}
		cout<<"impossible\n",exit(0);
	}
	for(int i=1;i<=n;i++)
		cout<<A[i]<<" \n"[i==n];
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

5 10 30
10 5 3 1 3

output:

5 3 4 2 1

result:

ok OK!

Test #2:

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

input:

5 5 20
5 3 3 3 3

output:

impossible

result:

ok OK!

Test #3:

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

input:

5 10 20
6 1 9 3 2

output:

1 4 5 2 3

result:

ok OK!

Test #4:

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

input:

5 10 20
5 3 10 7 10

output:

3 4 5 1 2

result:

ok OK!

Test #5:

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

input:

5 10 30
1 0 1 8 5

output:

3 1 2 5 4

result:

ok OK!

Test #6:

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

input:

5 10 30
2 0 5 4 2

output:

5 1 2 4 3

result:

ok OK!

Test #7:

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

input:

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

output:

impossible

result:

ok OK!

Test #8:

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

input:

100 10 500
6 3 9 7 6 9 0 9 2 8 1 3 1 6 1 0 5 9 5 0 8 6 6 6 4 5 9 10 9 1 4 6 4 7 0 2 10 6 8 3 10 10 10 6 4 2 9 1 3 7 6 8 2 9 8 7 8 2 4 0 0 4 0 1 8 3 9 3 3 9 5 5 5 10 5 0 2 1 7 3 1 1 7 3 10 8 6 1 4 2 9 2 2 7 7 9 8 9 3 10

output:

75 73 1 72 5 71 14 26 22 19 23 17 89 62 59 24 45 33 32 31 38 25 99 84 80 69 68 66 49 40 44 12 2 93 92 90 77 58 53 46 36 9 88 82 81 78 64 48 30 15 13 11 76 63 61 60 35 20 16 7 51 87 4 34 50 56 79 83 94 95 10 21 39 52 55 57 65 86 97 3 6 8 18 27 29 47 54 67 70 91 96 98 28 37 41 42 43 74 85 100

result:

ok OK!

Test #9:

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

input:

100 10 700
4 1 4 5 1 0 5 4 10 1 1 7 3 5 9 7 10 8 0 5 3 5 10 3 6 6 3 7 8 9 2 5 7 7 7 2 2 5 5 1 8 5 9 9 7 9 0 8 7 4 0 1 7 7 0 5 4 2 10 5 6 0 6 4 7 7 3 0 8 8 10 0 3 6 9 7 9 9 1 5 5 1 3 7 6 2 4 1 6 5 10 7 1 9 2 10 8 10 6 2

output:

73 67 27 24 83 21 13 100 95 86 1 58 37 36 31 93 88 82 79 52 40 11 10 5 2 72 68 62 55 51 47 19 6 3 8 50 57 64 87 4 7 14 20 22 32 38 39 42 56 60 80 81 90 25 26 61 63 74 85 89 99 12 16 28 33 34 35 45 49 53 54 65 66 76 84 92 18 29 41 48 69 70 97 15 30 43 44 46 75 77 78 94 9 17 23 59 71 91 96 98

result:

ok OK!

Test #10:

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

input:

1 1234 1234
1013

output:

1

result:

ok OK!

Test #11:

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

input:

1 1234 1233
624

output:

impossible

result:

ok OK!

Test #12:

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

input:

1 1234 0
687

output:

impossible

result:

ok OK!

Test #13:

score: 0
Accepted
time: 48ms
memory: 7016kb

input:

200000 10000 1000000000
8921 3623 7011 8278 8086 2783 4457 5902 7464 5876 1579 2253 8966 3408 987 5502 9659 4223 5299 3681 1608 9803 684 4099 953 6217 3496 9612 5796 4970 266 7260 2634 4780 6478 9399 8243 789 9559 6407 682 1609 5280 842 5489 4685 4688 4649 3167 2157 6727 3552 7107 1001 3453 2361 190...

output:

16298 15207 13632 22213 11385 23692 193753 24819 191755 57806 184092 69424 161762 72292 140037 74393 117903 82928 117878 85248 93464 86911 84731 87671 41298 89308 38488 91095 38309 105638 10562 136135 185000 151467 182856 173806 182726 182423 171195 185150 164741 190018 155318 192753 149251 194589 1...

result:

ok OK!

Test #14:

score: 0
Accepted
time: 44ms
memory: 8784kb

input:

200000 10000 400000000
1375 4634 6196 7880 3916 5282 5886 5029 9624 1822 6029 3390 9761 3178 5301 2057 3609 9748 8052 2455 3306 9857 4539 4130 3354 9277 5528 9435 4129 6993 2749 1356 3565 4986 6120 7997 3711 744 6146 8674 2764 3155 9681 1362 1644 6703 9630 3811 300 5236 8750 1296 2846 8167 6441 969 ...

output:

impossible

result:

ok OK!

Test #15:

score: 0
Accepted
time: 51ms
memory: 7140kb

input:

200000 10000 1200000000
5640 8949 4055 7828 7186 2174 7896 2683 6277 9589 4157 9738 3996 9909 9230 9023 6224 7346 2136 8913 7823 4340 8546 7659 5209 1175 5744 3827 6604 473 5896 5576 9207 3807 4000 7556 824 9571 8904 8568 9402 5280 5041 7686 5803 4248 5886 7239 6252 7283 5910 9883 8517 6464 2339 502...

output:

80221 74163 67694 84272 60691 91205 47171 45610 109102 42903 111303 37098 33976 114075 24233 118771 21915 10727 128500 8141 129676 193881 187343 134648 173234 158892 171466 171081 175479 169855 179948 167992 165243 2951 164144 3105 163747 145876 4330 145146 4646 128259 125727 13460 123629 29738 1201...

result:

ok OK!

Test #16:

score: 0
Accepted
time: 44ms
memory: 7176kb

input:

200000 10000 1503000000
4883 3705 3823 2099 5338 2416 6425 3409 1205 2419 8934 890 8719 9768 1352 1081 3399 8595 1222 2645 2846 11 9446 9981 7398 9277 5093 84 825 4450 9679 8860 1624 3159 3486 7699 5277 424 6615 1920 7201 9369 2389 258 7605 7387 5939 3354 5713 3615 3614 4369 1911 6738 7885 1667 1469...

output:

impossible

result:

ok OK!

Test #17:

score: 0
Accepted
time: 51ms
memory: 9952kb

input:

200000 10000 1502140000
653 7136 1249 5366 1127 9867 4407 7596 7667 8651 1926 4122 1944 9440 2657 9188 4534 5793 2093 1702 7957 5949 6913 7920 478 3452 526 8453 5083 5306 1993 867 5474 308 8344 8464 4311 6362 236 8465 749 381 1585 4924 8308 2835 8990 132 9321 8362 5617 3524 2433 3122 7942 6261 9708 ...

output:

32743 26670 20136 17715 41135 17186 7927 197925 61378 167668 154590 150799 100360 139703 135973 134887 102387 125858 118508 108305 103557 104545 104021 95948 110964 81093 61883 22097 115057 17070 12734 8857 164857 193536 178921 172623 165962 171644 167785 149093 168612 145581 129186 122291 171657 11...

result:

ok OK!

Test #18:

score: 0
Accepted
time: 55ms
memory: 10112kb

input:

200000 10000 1500340000
291 207 9762 2332 2180 1112 6177 9183 9776 4032 9699 7579 1824 9501 7608 7922 7715 7886 3299 1389 2529 8466 4144 1713 4971 6873 7305 1172 2203 8427 5959 7603 6485 2420 4351 7599 5266 8748 4280 8949 3501 4920 881 9516 7857 3105 5795 6619 5225 3659 6289 7983 3130 4485 9046 2842...

output:

46192 43462 41049 24558 51438 20369 186586 180708 52425 166686 163375 147802 61857 135475 126103 104621 67487 89470 72351 68619 78353 66976 62849 32615 102332 29046 19141 11129 103684 9370 8657 4344 115866 1478 184779 177359 120085 174892 157843 142629 127447 139963 92002 89210 153597 88109 78496 77...

result:

ok OK!

Test #19:

score: 0
Accepted
time: 39ms
memory: 8756kb

input:

200000 10000 1500700000
7149 4288 4642 8798 3889 8148 1944 8715 2911 8181 9295 9511 5370 6969 2300 2430 7281 3824 7923 4364 6242 2276 3747 7817 3517 6771 5995 4157 9918 5051 2738 2803 2134 4831 8287 9553 1986 3295 2984 6401 3145 434 8522 2375 1668 2493 9549 5135 2730 377 3715 4550 2934 4898 5974 761...

output:

impossible

result:

ok OK!

Test #20:

score: 0
Accepted
time: 44ms
memory: 9836kb

input:

200000 10000 499880000
9661 2305 499 9638 9339 2149 5655 4275 847 7360 9708 5245 1900 8203 303 6493 1600 9072 9537 3333 92 3698 1275 1729 6630 4762 4687 222 7659 9563 6000 9153 5126 4850 2554 2198 55 3719 5780 9133 6160 6903 9371 7145 536 3378 1018 5626 8064 983 3094 5562 7444 6 7881 2294 5573 5713 ...

output:

impossible

result:

ok OK!

Test #21:

score: 0
Accepted
time: 54ms
memory: 8636kb

input:

200000 10000 500820000
8517 1238 7979 6059 4945 202 5745 2864 131 4501 9001 5068 5248 120 3517 6011 6851 2685 4110 66 8311 3058 3449 5980 5169 7205 1495 5279 1759 5385 4542 6259 7419 2363 9609 2348 8076 7111 1067 5535 7882 4842 1605 2466 6535 1533 7822 7210 9628 5317 7359 2792 8956 7961 6727 5671 29...

output:

38509 28053 54757 73018 81331 7896 87166 94773 97632 7530 110644 114636 118226 1410 127208 131996 138208 173820 143914 147753 153034 170214 157426 175041 175163 165672 183416 193792 3504 154543 18311 21815 26429 149072 34215 56480 73806 144020 94142 102699 104491 126683 106948 108878 114600 111131 1...

result:

ok OK!

Test #22:

score: 0
Accepted
time: 46ms
memory: 7024kb

input:

200000 10000 499510000
8651 6579 7438 1225 154 8748 1662 1796 5994 4526 8881 9475 8368 4579 6119 8341 3041 4159 8658 6748 7889 5565 3287 1726 6477 627 7708 3832 8745 7794 7943 2063 5391 149 1407 21 8251 5290 8945 4601 474 2317 2869 4562 7571 8117 8350 6952 8077 5059 1635 7788 3891 9741 8672 9929 856...

output:

117257 108092 128886 129093 130722 99014 135761 136152 140674 94771 165984 1485 21038 87164 43476 45471 45559 85999 58192 58907 74477 83865 78708 82103 84095 80553 93634 93825 102797 71065 109279 133542 135790 65020 158471 176635 176639 51229 181282 187139 189811 38888 4383 26354 27851 22325 32247 3...

result:

ok OK!

Test #23:

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

input:

10000 10000 25510000
5563 6952 3451 8226 9398 7392 426 5810 1031 9335 689 8759 4331 1223 3966 6789 3259 1931 7419 394 8532 7154 7763 7341 939 2060 303 8753 5418 6261 406 317 3313 6904 1510 5814 8919 7097 207 9966 4036 2623 9169 3055 1624 3472 2762 5405 3449 708 9692 4329 2526 7325 4508 2656 3776 675...

output:

8105 8365 9188 5157 5827 8147 511 2209 9884 6113 7586 4565 5106 7739 522 1176 2334 3431 5093 6743 7064 9473 811 2957 2937 8047 2756 861 7002 7844 3621 6375 3987 2586 6832 3793 4110 6756 9506 9639 532 2299 6067 8954 9374 6807 2039 9885 8666 4579 5239 6413 8061 3226 7057 8965 8790 5328 5179 8517 3634 ...

result:

ok OK!

Test #24:

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

input:

100 10000 220000
559 118 438 1357 4745 2698 3287 8095 3636 2403 6777 8124 4326 8156 9760 3714 4415 854 2097 4739 5033 9645 8331 523 986 3051 635 6978 3184 8515 988 4105 3344 4678 2376 2510 2431 1786 8596 1406 1260 6189 3621 961 1736 6422 9671 7717 7672 395 6468 288 356 5024 3083 3684 9344 8523 3055 ...

output:

48 81 77 99 75 92 85 8 12 49 14 83 93 76 28 23 30 90 58 73 39 71 11 96 57 65 74 22 88 51 47 46 42 98 80 94 89 21 54 100 87 5 20 15 34 64 82 69 60 17 13 68 32 79 16 56 9 43 63 95 33 7 84 29 55 59 26 6 61 36 37 86 10 35 19 97 67 38 66 45 78 40 72 4 62 41 70 31 25 44 18 27 1 24 3 50 91 53 52 2

result:

ok OK!

Test #25:

score: 0
Accepted
time: 39ms
memory: 9732kb

input:

200000 1 99553
0 1 0 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 1 1 1 0 1 1 0 0 0 1 1 0 1 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 0 1 1 1 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 0 1 1 1 1 1 1 0 0 1 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 1 0 0 0 1 1 0...

output:

2 200000 199999 199998 199995 199993 199990 199989 199986 199985 199984 199983 199982 199981 199980 199979 199975 199974 199970 199968 199967 199962 199961 199959 199957 199954 199953 199952 199951 199948 199946 199945 199944 199942 199941 199938 199937 199936 199935 199933 199932 199931 199930 1999...

result:

ok OK!

Test #26:

score: 0
Accepted
time: 40ms
memory: 8716kb

input:

200000 1 100067
0 1 0 0 1 0 0 0 1 1 0 0 0 0 1 0 1 1 1 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 1 0 1 1 0 0 0 1 0 1 1 0 0 0 0 1 0 1 0 1 0 0 0 1 1 1 1 0 0 1 1 1 0 0 0 1 1 0 0 0 1 0 0 1 0 0 1 0 0 0 1 0 0 0 0 1 1 1 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 0 1 0 1 1 0 0 1 0 0 ...

output:

199999 199994 199993 199992 199989 199988 199983 199982 199981 199980 199978 199977 199974 199971 199968 199965 199964 199963 199962 199961 199959 199956 199954 199952 199951 199946 199944 199942 199941 199939 199937 199935 199932 199930 199928 199927 199925 199922 199921 199920 199917 199915 199914...

result:

ok OK!

Test #27:

score: 0
Accepted
time: 29ms
memory: 6960kb

input:

200000 1 100234
0 0 1 0 1 0 0 1 1 0 1 0 0 0 0 1 0 0 1 1 0 0 0 1 1 1 0 1 1 1 1 0 0 0 1 1 0 1 0 0 0 0 1 1 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 0 0 1 1 0 1 0 0 0 0 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 0 1 1 0 0 0 0 0 1 1 0 1 0 0 0 1 0 0 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 0 1 1 1 ...

output:

impossible

result:

ok OK!

Test #28:

score: 0
Accepted
time: 30ms
memory: 7136kb

input:

200000 1 99748
0 1 1 0 0 1 1 0 0 1 0 0 0 0 1 0 1 0 0 1 1 0 1 0 0 1 0 0 1 1 0 1 0 0 0 1 1 1 0 0 1 0 1 1 1 1 0 0 0 1 0 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0 1 1 0 0 0 0 1 1 1 1 0 0 0 1 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 1 0 1 1 0 1 0 0 0 1 1 1 0 1 1 0 1 1 0 1 0 1 1...

output:

impossible

result:

ok OK!

Test #29:

score: 0
Accepted
time: 40ms
memory: 10292kb

input:

200000 10000 2000000000
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:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 ...

result:

ok OK!

Test #30:

score: 0
Accepted
time: 31ms
memory: 8480kb

input:

200000 1 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 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:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 ...

result:

ok OK!

Test #31:

score: 0
Accepted
time: 20ms
memory: 7188kb

input:

200000 1 1
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:

200000 199999 199998 199997 199996 199995 199994 199993 199992 199991 199990 199989 199988 199987 199986 199985 199984 199983 199982 199981 199980 199979 199978 199977 199976 199975 199974 199973 199972 199971 199970 199969 199968 199967 199966 199965 199964 199963 199962 199961 199960 199959 199958...

result:

ok OK!

Test #32:

score: 0
Accepted
time: 41ms
memory: 9900kb

input:

200000 10000 955400000
4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 47...

output:

104461 104460 104459 104462 104458 104463 104457 104464 104456 104465 104455 104466 104454 104467 104453 104468 104452 104469 104451 104470 104450 104471 104449 104448 104472 104447 104473 104446 104474 104445 104475 104444 104476 104443 104477 104442 104478 104441 104479 104440 104480 104439 104481...

result:

ok OK!

Test #33:

score: 0
Accepted
time: 33ms
memory: 10116kb

input:

200000 10000 955400000
4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 4777 47...

output:

104461 104460 104459 104462 104458 104463 104457 104464 104456 104465 104455 104466 104454 104467 104453 104468 104452 104469 104451 104470 104450 104471 104449 104448 104472 104447 104473 104446 104474 104445 104475 104444 104476 104443 104477 104442 104478 104441 104479 104440 104480 104439 104481...

result:

ok OK!

Test #34:

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

input:

200000 10000 895540000
4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 4477 44...

output:

110452 110451 110450 110453 110449 110454 110448 110455 110447 110456 110446 110445 110457 110444 110458 110443 110459 110442 110460 110441 110440 110461 110439 110462 110438 110463 110437 110464 110436 110435 110465 110434 110466 110433 110467 110432 110468 110431 110469 110430 110429 110470 110428...

result:

ok OK!

Test #35:

score: 0
Accepted
time: 39ms
memory: 10252kb

input:

200000 10000 1999650000
9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9999 9...

output:

186338 7790 187446 117660 38513 84423 37023 96594 136337 16949 195251 49018 197725 58058 107582 36051 92873 43846 7019 40711 197097 160202 176774 25715 17040 122792 120938 17484 198104 199282 167566 119159 3687 178112 85396 185457 169139 188733 27354 195021 137124 155125 70855 70656 190587 141101 13...

result:

ok OK!

Test #36:

score: 0
Accepted
time: 41ms
memory: 10092kb

input:

200000 10000 430000
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 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:

103971 85039 130423 151551 56404 70149 22880 3361 178232 180425 62564 157071 180792 31089 45039 81319 61754 150063 197517 163558 15379 7875 89101 6689 156572 2482 90112 1819 48415 35587 91221 19306 52818 74653 134100 162774 176083 138579 155326 137578 174307 143598 84525 54901 170532 164137 901 1764...

result:

ok OK!

Test #37:

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

input:

200000 10000 1000000001
481 6929 8726 8179 1721 8284 193 8395 9510 2029 4371 351 3543 4360 3348 7872 6276 6309 5194 6678 5799 5097 3407 7999 6831 2584 7128 6419 2823 5041 4877 3882 8129 8292 6838 105 9634 4203 4449 3056 6 9795 758 853 8064 1806 2832 2037 259 8357 3967 2484 1453 7853 3396 873 3778 15...

output:

impossible

result:

ok OK!

Test #38:

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

input:

200000 10000 1000000003
5487 6709 796 9936 5697 239 2405 418 8162 9794 8797 1180 826 5930 6859 2285 9964 3918 2712 8714 871 7411 1882 3380 8584 2858 6075 8329 5838 4571 4153 2824 2611 2991 3381 8540 1063 7122 4379 3744 4167 2580 5980 8727 8361 7738 2054 1966 4226 4653 4759 7215 50 1196 6296 643 5366...

output:

impossible

result:

ok OK!

Test #39:

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

input:

200000 10000 1000000005
9484 366 1495 6948 6244 1747 6285 2304 6809 2245 2279 200 7353 2491 8376 5834 2871 30 3207 8666 5656 5972 2499 6422 8486 999 1993 3078 3771 4655 5555 6161 7911 6344 6347 1939 2572 5950 4648 6399 1598 6320 3008 4898 1159 9213 5908 2374 6574 7736 1699 3292 3195 6079 1301 4424 3...

output:

impossible

result:

ok OK!

Test #40:

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

input:

200000 10000 0
9779 1429 8986 3242 4305 2540 6652 804 9537 9160 3449 4715 4599 3495 5652 744 8787 5577 7104 2591 1229 4875 164 3890 4865 6660 4425 678 2970 9842 8831 8021 4855 6639 5673 7446 3428 9010 8186 4299 8022 7059 2108 2543 5773 5087 8402 6756 2626 1425 7771 9907 6404 7725 7048 6304 2411 2512...

output:

impossible

result:

ok OK!

Test #41:

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

input:

6 12 24
4 3 2 4 3 2

output:

1 5 2 6 3 4

result:

ok OK!

Test #42:

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

input:

9 7000 21000
3000 2999 2624 3000 2999 2624 3000 2999 2624

output:

1 8 5 4 2 9 7 6 3

result:

ok OK!

Test #43:

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

input:

12 10000 40000
4000 3999 3000 4000 3999 3000 4000 3999 3000 4000 3999 3000

output:

1 11 8 4 5 2 12 7 9 6 10 3

result:

ok OK!

Test #44:

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

input:

199998 9999 666593334
3333 3332 3331 3333 3332 3331 3333 3332 3331 3333 3332 3331 3333 3332 3331 3333 3332 3331 3333 3332 3331 3333 3332 3331 3333 3332 3331 3333 3332 3331 3333 3332 3331 3333 3332 3331 3333 3332 3331 3333 3332 3331 3333 3332 3331 3333 3332 3331 3333 3332 3331 3333 3332 3331 3333 333...

output:

1 199997 199994 199991 4 199988 199985 7 199982 199979 10 199976 199973 13 199970 199967 16 199964 199961 19 199958 199955 22 199952 199949 25 199946 199943 28 199940 199937 31 199934 199931 34 199928 199925 37 199922 199919 40 199916 199913 43 199910 199907 46 199904 199901 49 199898 199895 52 1998...

result:

ok OK!

Test #45:

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

input:

199998 9999 666593334
3335 3334 3333 3335 3334 3333 3335 3334 3333 3335 3334 3333 3335 3334 3333 3335 3334 3333 3335 3334 3333 3335 3334 3333 3335 3334 3333 3335 3334 3333 3335 3334 3333 3335 3334 3333 3335 3334 3333 3335 3334 3333 3335 3334 3333 3335 3334 3333 3335 3334 3333 3335 3334 3333 3335 333...

output:

1 199997 199994 4 199991 199988 7 199985 199982 10 199979 199976 13 199973 199970 16 199967 199964 19 199961 199958 22 199955 199952 25 199949 199946 28 199943 199940 31 199937 199934 34 199931 199928 37 199925 199922 40 199919 199916 43 199913 199910 46 199907 199904 49 199901 199898 52 199895 1998...

result:

ok OK!

Test #46:

score: 0
Accepted
time: 42ms
memory: 9464kb

input:

199998 9999 666593334
4000 3334 3333 4000 3334 3333 4000 3334 3333 4000 3334 3333 4000 3334 3333 4000 3334 3333 4000 3334 3333 4000 3334 3333 4000 3334 3333 4000 3334 3333 4000 3334 3333 4000 3334 3333 4000 3334 3333 4000 3334 3333 4000 3334 3333 4000 3334 3333 4000 3334 3333 4000 3334 3333 4000 333...

output:

1 199997 199994 4 199991 199988 7 199985 199982 10 199979 199976 13 199973 199970 16 199967 199964 19 199961 199958 22 199955 199952 25 199949 199946 28 199943 199940 31 199937 199934 34 199931 199928 37 199925 199922 40 199919 199916 43 199913 199910 46 199907 199904 49 199901 199898 52 199895 1998...

result:

ok OK!

Test #47:

score: 0
Accepted
time: 36ms
memory: 9656kb

input:

199998 9999 666593334
3332 3331 3330 3332 3331 3330 3332 3331 3330 3332 3331 3330 3332 3331 3330 3332 3331 3330 3332 3331 3330 3332 3331 3330 3332 3331 3330 3332 3331 3330 3332 3331 3330 3332 3331 3330 3332 3331 3330 3332 3331 3330 3332 3331 3330 3332 3331 3330 3332 3331 3330 3332 3331 3330 3332 333...

output:

impossible

result:

ok OK!