QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#549111 | #3278. 算术 | Flamire# | 26 | 80ms | 4068kb | C++17 | 1.1kb | 2024-09-06 09:03:33 | 2024-09-06 09:03:34 |
Judging History
answer
#include <bits/stdc++.h>
#define ll long long
#define lll __int128
using namespace std;
int t;ll p;
ll gcd(ll a,ll b){return !b?a:gcd(b,a%b);}
ll phi(ll x)
{
ll ans=x;
for(int i=2;1ll*i*i<=x;++i)if(x%i==0)
{
ans=ans/i*(i-1);
while(x%i==0)x/=i;
}
if(x!=1)ans=ans/x*(x-1);
return ans;
}
map<ll,int> mp;
ll qpow(ll bs,ll ex){ll ans=1;while(ex){if(ex&1)ans=(lll)ans*bs%p;bs=(lll)bs*bs%p;ex>>=1;}return ans;}
int main()
{
scanf("%d%lld",&t,&p);ll pi=phi(p),tpi=pi;
for(int i=2;1ll*i*i<=pi;++i)
{
while(pi%i==0)++mp[i],pi/=i;
}
if(pi!=1)++mp[pi];
pi=tpi;
while(t--)
{
ll B;scanf("%lld",&B);
if(gcd(B,p)!=1){printf("-1\n");continue;}
ll res=pi;
for(auto x:mp)
{
while(res%x.first==0&&qpow(B,res/x.first)==1)res/=x.first;
}
ll ans=-1;
for(int k=1;k<=pi;++k)if(qpow(B,k+1)==p-1){ans=k;break;}
printf("%lld\n",ans);
// if(res%2==0)
// {
// if(res==2)printf("2\n"),k=2;
// else printf("%lld\n",res/2-1),k=res/2-1;
// }
// else printf("-1\n");
}
fclose(stdin);fclose(stdout);return 0;
}
详细
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 0ms
memory: 4024kb
input:
10 3 10 7 13 4 17 28 29 13 4 30
output:
-1 -1 -1 -1 2 -1 2 -1 -1 -1
result:
ok 10 numbers
Test #2:
score: 5
Accepted
time: 0ms
memory: 3864kb
input:
10 3 17 21 29 8 25 21 8 14 26 7
output:
2 -1 2 2 -1 -1 2 2 2 -1
result:
ok 10 numbers
Test #3:
score: 5
Accepted
time: 0ms
memory: 3764kb
input:
10 2 14 12 20 12 7 4 6 12 16 13
output:
-1 -1 -1 -1 1 -1 -1 -1 -1 1
result:
ok 10 numbers
Subtask #2:
score: 5
Accepted
Dependency #1:
100%
Accepted
Test #4:
score: 5
Accepted
time: 0ms
memory: 3792kb
input:
10 4 10 10 39 26 20 30 23 13 17 27
output:
-1 -1 2 -1 -1 -1 2 -1 -1 2
result:
ok 10 numbers
Test #5:
score: 5
Accepted
time: 0ms
memory: 4028kb
input:
10 5 13 45 45 36 46 30 47 6 15 16
output:
1 -1 -1 -1 -1 -1 1 -1 -1 -1
result:
ok 10 numbers
Test #6:
score: 5
Accepted
time: 0ms
memory: 4068kb
input:
10 6 8 31 37 22 29 7 44 12 29 32
output:
-1 -1 -1 -1 2 -1 -1 -1 2 -1
result:
ok 10 numbers
Test #7:
score: 5
Accepted
time: 0ms
memory: 3768kb
input:
10 7 27 34 12 18 36 57 21 61 27 25
output:
2 2 2 -1 -1 -1 -1 2 2 -1
result:
ok 10 numbers
Test #8:
score: 5
Accepted
time: 0ms
memory: 3768kb
input:
10 8 36 58 52 78 43 42 51 40 18 27
output:
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1
result:
ok 10 numbers
Test #9:
score: 5
Accepted
time: 0ms
memory: 4068kb
input:
10 9 53 26 68 54 24 81 29 13 71 71
output:
2 2 2 -1 -1 -1 2 -1 2 2
result:
ok 10 numbers
Test #10:
score: 5
Accepted
time: 0ms
memory: 4024kb
input:
10 10 67 43 20 39 55 51 47 62 87 100
output:
1 1 -1 2 -1 -1 1 -1 1 -1
result:
ok 10 numbers
Subtask #3:
score: 5
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Test #11:
score: 5
Accepted
time: 0ms
memory: 3792kb
input:
100 97 180 581 305 712 315 861 922 484 175 519 943 365 547 142 770 114 182 452 746 290 158 583 185 600 609 412 523 397 227 839 604 387 116 621 914 640 324 678 221 938 709 677 876 678 213 653 581 903 299 287 860 765 672 180 399 907 814 969 934 956 820 864 235 848 815 367 241 737 674 417 856 404 291 4...
output:
47 2 47 3 11 7 23 2 15 15 7 47 2 15 5 47 7 3 15 2 -1 -1 11 7 7 11 47 11 3 15 1 2 15 47 47 47 3 2 7 23 15 23 23 2 15 47 2 15 7 11 47 23 47 47 23 15 47 2 -1 47 23 11 47 23 47 47 3 47 47 47 47 5 -1 47 3 15 47 47 15 2 15 23 47 2 11 5 1 47 47 2 15 2 47 47 47 3 47 2 23 15
result:
ok 100 numbers
Test #12:
score: 5
Accepted
time: 1ms
memory: 3772kb
input:
100 91 851 144 363 247 607 696 363 691 883 394 118 371 360 787 879 868 168 103 842 706 414 746 540 702 217 817 497 573 822 395 108 384 551 620 436 374 340 907 855 181 849 661 580 707 726 513 749 636 812 454 874 227 472 315 791 806 752 909 188 690 664 547 657 153 138 171 587 419 430 731 349 512 904 7...
output:
-1 -1 2 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 2 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 2 -1 2 -1 -1 2 -1 -1 -1 -1 2 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 -1 2 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 -1 -1
result:
ok 100 numbers
Test #13:
score: 5
Accepted
time: 0ms
memory: 3848kb
input:
100 81 85 543 544 188 666 539 270 161 666 323 221 522 512 207 622 762 284 740 143 397 265 774 419 370 344 163 214 214 501 262 436 328 647 754 453 161 416 809 723 229 496 735 357 478 242 161 227 389 188 325 382 134 463 736 325 329 231 102 623 553 728 445 460 636 416 646 637 221 219 436 695 298 161 87...
output:
-1 -1 -1 2 -1 2 -1 2 -1 2 26 -1 2 -1 -1 -1 26 26 8 -1 -1 -1 26 -1 26 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 2 26 2 -1 -1 -1 -1 -1 -1 2 2 26 26 2 -1 -1 2 -1 -1 -1 26 -1 -1 26 -1 2 -1 -1 -1 26 -1 -1 26 -1 -1 26 -1 2 -1 8 2 -1 -1 2 -1 -1 -1 -1 -1 26 -1 2 -1 -1 26 -1 -1 26 -1 26 26 -1 2 -1 -1
result:
ok 100 numbers
Test #14:
score: 5
Accepted
time: 0ms
memory: 3772kb
input:
100 100 738 253 417 420 523 537 778 736 670 839 957 849 419 768 796 772 493 269 631 615 606 484 445 701 324 586 601 690 439 249 221 372 648 999 682 202 889 231 386 179 399 414 487 480 349 436 470 749 549 149 779 707 440 737 467 449 483 803 900 459 549 972 979 949 604 244 553 509 269 784 721 387 427 ...
output:
-1 -1 -1 -1 -1 -1 -1 -1 -1 4 -1 -1 4 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 4 -1 -1 -1 -1 2 -1 -1 -1 -1 -1 4 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 4 -1 -1 -1 -1 -1 -1 -1 -1 4 -1 -1 4 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 4 -1 -1 -1 -1 -1 -1
result:
ok 100 numbers
Test #15:
score: 5
Accepted
time: 1ms
memory: 3776kb
input:
100 71 261 626 313 283 308 396 681 76 354 297 425 355 649 399 166 201 368 671 671 72 227 248 372 641 239 697 567 424 78 238 403 457 129 384 246 357 346 496 581 279 177 503 682 392 338 656 98 564 674 562 364 567 521 304 145 457 669 421 677 694 241 535 354 354 109 511 446 209 285 355 496 645 449 273 3...
output:
-1 -1 -1 2 -1 6 34 -1 2 34 2 -1 -1 34 -1 34 34 -1 -1 -1 4 34 4 -1 6 -1 2 34 34 -1 -1 34 -1 -1 34 -1 34 2 34 4 34 -1 -1 -1 -1 4 -1 34 34 34 -1 2 -1 -1 -1 34 -1 4 -1 34 34 -1 2 2 -1 4 -1 34 -1 -1 2 -1 6 -1 34 -1 -1 -1 34 6 34 34 6 34 -1 6 2 -1 4 -1 6 -1 6 34 4 34 34 -1 4 2
result:
ok 100 numbers
Test #16:
score: 5
Accepted
time: 0ms
memory: 3788kb
input:
100 91 405 173 240 151 729 826 614 533 292 878 272 184 613 170 632 215 836 320 437 240 837 612 243 527 492 762 818 734 139 166 355 228 790 419 808 365 181 254 277 884 683 174 546 870 170 280 818 624 596 701 483 854 421 638 766 885 634 361 634 242 519 902 834 316 558 392 710 791 719 570 465 667 599 8...
output:
-1 2 -1 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 2 2 -1 2 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 -1 2 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 -1
result:
ok 100 numbers
Test #17:
score: 5
Accepted
time: 0ms
memory: 4056kb
input:
100 67 329 142 107 81 244 378 571 198 307 141 547 206 488 342 107 639 358 589 127 315 509 551 501 347 388 268 550 131 351 526 102 541 270 669 588 378 195 209 638 228 212 527 231 350 506 178 374 164 320 401 129 413 504 669 155 445 518 659 151 239 126 303 535 102 237 334 566 220 309 633 133 362 200 26...
output:
32 10 -1 -1 10 10 -1 -1 -1 32 32 10 -1 32 -1 -1 -1 10 -1 -1 -1 -1 32 32 10 -1 -1 -1 -1 32 -1 10 32 2 10 10 32 10 -1 10 32 10 2 -1 -1 32 -1 2 10 2 -1 32 -1 2 -1 10 -1 -1 -1 2 -1 -1 2 -1 -1 2 2 -1 32 2 2 10 2 2 32 10 2 -1 32 -1 2 2 10 32 2 10 -1 10 32 -1 -1 10 32 -1 32 2 32 10 32 -1
result:
ok 100 numbers
Test #18:
score: 5
Accepted
time: 0ms
memory: 4056kb
input:
100 50 437 346 112 103 466 381 454 423 206 353 166 74 357 58 479 480 372 303 99 325 180 490 341 56 425 169 359 450 200 99 199 299 432 324 339 328 419 72 322 86 247 51 277 455 71 239 380 438 448 158 293 246 489 58 251 460 109 399 172 350 123 425 456 118 199 246 139 199 221 425 440 475 142 450 257 349...
output:
9 -1 -1 9 -1 -1 -1 9 -1 9 -1 -1 1 -1 4 -1 -1 9 2 -1 -1 -1 -1 -1 -1 4 4 -1 -1 2 2 2 -1 -1 4 -1 4 -1 -1 -1 9 -1 9 -1 -1 4 -1 -1 -1 -1 1 -1 4 -1 -1 -1 4 2 -1 -1 9 -1 -1 -1 2 -1 4 2 -1 -1 -1 -1 -1 -1 1 2 2 4 -1 4 9 -1 2 -1 9 -1 -1 -1 9 -1 9 -1 2 4 -1 -1 9 1 -1 -1
result:
ok 100 numbers
Test #19:
score: 5
Accepted
time: 0ms
memory: 3792kb
input:
100 24 180 159 233 75 236 31 147 81 175 180 119 117 79 175 204 182 137 123 36 127 132 125 175 239 128 188 240 32 139 105 175 183 171 107 56 206 58 125 95 182 33 49 215 135 62 223 77 199 145 65 103 125 214 154 87 47 29 175 52 178 92 150 31 32 209 134 220 92 217 74 35 223 128 215 234 127 239 112 141 6...
output:
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
result:
ok 100 numbers
Subtask #4:
score: 11
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Test #20:
score: 11
Accepted
time: 31ms
memory: 3772kb
input:
100 6007 47209 17765 12070 33936 9456 46389 53980 47081 33569 12604 9471 53986 30034 23277 45832 42538 42048 16651 8020 57713 18099 10847 36498 53379 48899 46111 27949 35995 19980 36681 43053 30147 13279 42048 54141 14304 22364 24027 47979 45448 8046 46884 34366 44206 42127 49959 27880 37359 17772 3...
output:
-1 1000 3002 3002 272 -1 -1 -1 3002 -1 3002 2 2 1000 -1 1000 2 3002 230 1000 2 76 3002 3002 1000 12 -1 3002 76 3002 -1 428 272 2 2 230 90 2 2 32 3002 -1 -1 3002 2 -1 -1 428 1000 2 -1 -1 -1 428 1000 3002 -1 -1 2 -1 3002 1000 -1 -1 1000 3002 1000 -1 3002 -1 -1 3002 -1 -1 3002 76 -1 2 -1 3002 1000 -1 -...
result:
ok 100 numbers
Test #21:
score: 11
Accepted
time: 21ms
memory: 3772kb
input:
100 4051 8389 31611 11594 12817 33649 7172 26030 7466 8694 10490 4761 17984 17340 10129 38474 14225 31740 30259 32111 33089 27227 28415 6946 12349 7420 9073 32082 36458 32201 18875 13076 19473 17013 37823 13577 16711 4649 23061 26207 27875 15180 21335 10917 7084 30956 16203 7707 6450 14670 7951 1721...
output:
-1 2 2024 674 14 2024 -1 44 404 134 -1 2024 674 -1 2024 -1 2024 -1 74 -1 2024 2024 2024 -1 74 404 -1 2 -1 674 -1 -1 674 74 2024 2024 2024 -1 404 2024 4 -1 2024 -1 -1 2 -1 404 2024 -1 674 -1 2024 674 -1 2 2024 2024 -1 -1 80 2 2 2024 -1 -1 2024 2 404 2024 2024 2 -1 224 2024 2024 2024 -1 -1 -1 74 2024 ...
result:
ok 100 numbers
Test #22:
score: 11
Accepted
time: 57ms
memory: 3772kb
input:
100 9323 15509 64805 9567 78745 68708 83906 38816 82251 19294 18197 16917 66211 21706 24188 62893 35932 67872 23904 69166 43685 52836 82840 58824 65466 34882 72563 54038 64098 22473 15338 66018 38785 34483 59422 61403 33509 22947 47635 71422 29273 18645 25141 63196 26208 64199 46614 86896 34049 6128...
output:
-1 -1 4660 4660 -1 2 4660 4660 4660 4660 -1 4660 -1 -1 78 4660 78 -1 4660 4660 4660 4660 -1 4660 -1 4660 4660 4660 4660 4660 -1 -1 4660 -1 4660 -1 -1 -1 4660 4660 2 4660 4660 -1 4660 2 58 4660 -1 -1 4660 4660 -1 4660 4660 2 4660 78 -1 -1 4660 -1 -1 -1 -1 4660 4660 -1 -1 4660 2 4660 4660 4660 -1 4660...
result:
ok 100 numbers
Test #23:
score: 11
Accepted
time: 6ms
memory: 3724kb
input:
100 8280 71879 23524 17600 51841 13733 36730 17103 75017 31999 35727 69190 72656 28447 9974 25960 69762 62416 76743 27773 46635 56719 54711 46264 46757 31392 53859 27856 31928 52586 70471 18092 25217 25832 12140 60872 71114 23369 17479 30580 70472 72974 35126 58879 31688 16559 17801 79266 52471 4044...
output:
-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 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 32 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
result:
ok 100 numbers
Test #24:
score: 11
Accepted
time: 80ms
memory: 4028kb
input:
100 8633 60430 10480 80513 83117 67906 46501 32354 26204 49326 41990 50727 62145 81183 29273 55670 78867 75581 17937 81612 69528 83551 42551 50586 29030 61423 10770 26151 20132 55575 77777 66256 23652 69887 25681 36638 74155 26147 61308 50210 17265 46745 83050 11699 38357 80577 47044 44634 66132 705...
output:
2 -1 -1 -1 -1 -1 -1 -1 -1 -1 131 -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 131 131 -1 2 -1 -1 -1 -1 -1 -1 -1 21 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 131 -1 -1 -1 -1 -1 -1 -1 -1 -1 21 -1 -1 -1 -1 43 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 131 -1 -1 -1 -1
result:
ok 100 numbers
Test #25:
score: 11
Accepted
time: 5ms
memory: 3772kb
input:
100 1875 15679 16586 6272 11545 14154 11282 15493 7847 18568 4598 8478 11768 16436 15352 9091 14374 13265 14897 14270 1920 14276 7011 6582 10208 8432 18251 5856 11275 10003 18124 14074 6642 7945 18271 4581 5518 9117 7164 9810 17960 12619 14093 17756 11327 8702 3496 15221 8502 10143 6183 5729 11911 2...
output:
-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 124 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 124 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 124 -1 -1
result:
ok 100 numbers
Test #26:
score: 11
Accepted
time: 2ms
memory: 3772kb
input:
100 359 443 2987 2153 3063 1307 1588 795 2153 2512 2591 524 2694 1893 2730 3485 1077 2807 3038 2904 2269 1773 1341 1482 717 2477 1831 900 985 1435 1076 3304 1045 1746 1076 1176 3563 2931 899 2084 1038 444 976 3379 1435 572 3234 2750 936 801 2601 2047 716 3270 866 1360 2022 379 3196 1804 963 3230 199...
output:
178 -1 2 -1 -1 178 178 2 2 178 -1 -1 -1 -1 -1 -1 -1 178 -1 -1 178 -1 -1 2 178 -1 -1 178 2 2 -1 178 178 2 -1 178 178 -1 -1 -1 -1 178 -1 2 178 -1 -1 178 178 -1 178 178 178 -1 -1 178 -1 -1 -1 -1 2 -1 2 2 -1 -1 178 2 -1 -1 178 2 -1 178 178 178 178 178 -1 178 -1 -1 -1 178 -1 2 -1 178 178 178 2 -1 178 -1 ...
result:
ok 100 numbers
Test #27:
score: 11
Accepted
time: 45ms
memory: 3768kb
input:
100 6973 50532 67580 25240 33029 50583 10822 34495 41837 40773 40179 20901 49720 41837 44264 64287 64960 44010 28573 22717 52205 47391 29408 20424 26758 67060 32920 53581 47349 22979 46108 66098 25603 8976 8686 52270 20003 16149 65989 23187 66906 60114 18119 40683 67021 11027 22187 61716 25430 66530...
output:
-1 -1 2 -1 -1 -1 -1 2 -1 548 -1 -1 2 -1 -1 -1 -1 -1 182 -1 -1 548 182 -1 -1 182 -1 -1 -1 548 -1 548 182 548 -1 548 -1 -1 -1 -1 -1 182 -1 -1 -1 548 -1 -1 -1 -1 548 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 -1 182 -1 -1 182 182 60 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 182 -1 -1 -1 -1 -1 548 182 18...
result:
ok 100 numbers
Test #28:
score: 11
Accepted
time: 17ms
memory: 3800kb
input:
100 7489 11286 72696 34199 47402 53224 14096 64001 38566 44544 57454 74889 37269 26930 41362 41230 42424 43515 61221 68174 68262 35058 8030 20659 62087 14962 34368 62824 38218 64126 61521 25171 41679 44197 73007 18633 40348 39008 50920 37797 59911 28408 47024 23582 56987 63187 8393 70496 70084 52775...
output:
1247 143 1247 2 3743 1871 1871 233 1871 1247 2 1871 1247 3743 155 3743 3743 415 3 935 3743 3743 935 623 116 1247 3743 3 3743 103 11 3743 415 3743 3743 935 3743 467 15 2 3743 3743 -1 467 3743 935 935 1247 15 287 935 1247 51 415 3743 1247 2 1247 3743 3743 311 3743 3743 103 3743 935 1871 116 935 287 15...
result:
ok 100 numbers
Test #29:
score: 11
Accepted
time: 28ms
memory: 3776kb
input:
100 3937 10264 30561 27656 9016 17800 9056 36272 23767 32404 26071 18011 22166 24538 16184 26093 7872 30456 28053 4980 4713 13936 36679 31485 38397 10876 7132 4139 12467 33711 4044 22369 15590 11318 31818 33162 19412 19938 14040 27031 30100 8911 28719 9762 15544 19864 8586 36326 11811 12911 38335 30...
output:
-1 -1 -1 2 2 -1 -1 -1 -1 -1 -1 -1 104 -1 314 34 -1 -1 -1 -1 314 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 20 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 2 104 2 -1 -1 20 -1 20 104 -1 -1 314 -1 -1 -1 2 62 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 8 -1 -1 -1 -1
result:
ok 100 numbers
Subtask #5:
score: 0
Time Limit Exceeded
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Test #30:
score: 0
Time Limit Exceeded
input:
100 870871 4340793 1243207 5051375 6213833 4858829 5468093 1895983 4716622 4329188 7326127 7032179 1732301 4515071 3496892 7006275 3559934 4552910 6966967 2034005 6050959 4863305 1122074 2063870 7741800 6492441 6966967 2658328 3291177 6528485 7290647 7692269 3278193 1657513 7526455 6977925 5565770 8...
output:
result:
Subtask #6:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
0%
Subtask #7:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
0%
Subtask #8:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
0%
Subtask #9:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
0%
Subtask #10:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
0%