QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#67568#4782. 完美的旅行alpha1022100 ✓416ms7700kbC++233.6kb2022-12-10 17:30:412022-12-10 17:30:45

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-12-10 17:30:45]
  • 评测
  • 测评结果:100
  • 用时:416ms
  • 内存:7700kb
  • [2022-12-10 17:30:41]
  • 提交

answer

#include <cstdio>
#include <algorithm>
using namespace std;
const int N = 64;
const int M = 2e4;
const int mod = 998244353;
inline int fpow(int a, int b) {
  int ret = 1;
  for (; b; b >>= 1)
    (b & 1) && (ret = (long long)ret * a % mod), a = (long long)a * a % mod;
  return ret;
}
int n, m;
int a[N][N];
inline int det(int a[N][N]) {
  int temp[N][N];
  int ret = 1;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j)
      temp[i][j] = a[i][j];
  for (int i = 0; i < n; ++i) {
    int num = -1;
    for (int j = i; j < n; ++j)
      if (temp[j][i])
        num = j;
    if (num == -1)
      return 0;
    if (num > i) {
      ret = mod - ret;
      for (int j = 0; j < n; ++j)
        swap(temp[i][j], temp[num][j]);
    }
    int inv = fpow(temp[i][i], mod - 2);
    for (int j = i + 1; j < n; ++j)
      if (temp[j][i])
        for (int k = i, v = (long long)temp[j][i] * inv % mod; k < n; ++k)
          temp[j][k] = (temp[j][k] - (long long)v * temp[i][k] % mod + mod) % mod;
  }
  for (int i = 0; i < n; ++i)
    ret = (long long)ret * temp[i][i] % mod;
  return ret;
}
inline void mul(int a[N][N], int b[N][N], int c[N][N]) {
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j)
      c[i][j] = 0;
  for (int k = 0; k < n; ++k)
    for (int i = 0; i < n; ++i)
      for (int j = 0; j < n; ++j)
        c[i][j] = (c[i][j] + (long long)a[i][k] * b[k][j]) % mod;
}
int chr[N + 5], temp[N + 5];
int p[N + 5], q[N + 5];
int pw[N][N][N], f[N][N];
int ans[N][M + 5], ans_xor;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j)
      scanf("%d", a[i] + j);
  for (int x = 0, y; x <= n; ++x) {
    for (int i = 0; i < n; ++i)
      a[i][i] = (a[i][i] - x + mod) % mod;
    y = det(a);
    for (int i = 0; i < n; ++i)
      a[i][i] = (a[i][i] + x) % mod;
    temp[0] = 1;
    for (int i = 1; i <= n; ++i)
      temp[i] = 0;
    for (int i = 0; i <= n; ++i)
      if (x ^ i) {
        for (int j = n; j; --j)
          temp[j] = (temp[j - 1] - (long long)i * temp[j] % mod + mod) % mod;
        temp[0] = (mod - (long long)i * temp[0] % mod) % mod;
        y = (long long)y * fpow((x - i + mod) % mod, mod - 2) % mod;
      }
    for (int i = 0; i <= n; ++i)
      chr[i] = (chr[i] + (long long)y * temp[i]) % mod;
  }
  for (int i = 0; i < n; ++i)
    pw[0][i][i] = 1;
  for (int k = 1; k < n; ++k)
    mul(pw[k - 1], a, pw[k]);
  for (int k = 0; k < n; ++k)
    for (int v = 0; v < n; ++v)
      for (int i = 0; i < n; ++i)
        if ((v & i) == v)
          for (int j = 0; j < n; ++j)
            if ((v & j) == v)
              f[v][k] = (f[v][k] + pw[k][i][j]) % mod;
  for (int v = 0, c; v < n; ++v) {
    q[0] = 1;
    for (int i = 1; i <= n; ++i)
      q[i] = chr[n - i];
    for (int i = 0; i < n; ++i) {
      p[i] = 0;
      for (int j = 0; j <= i; ++j)
        p[i] = (p[i] + (long long)f[v][j] * q[i - j]) % mod;
    }
    p[n] = 0, c = f[v][0];
    for (int i = 0, t; i <= n; ++i)
      t = q[i], q[i] = ((c + 1LL) * q[i] - p[i] + mod) % mod, p[i] = t;
    for (int i = 0; i <= n; ++i)
      ans[v][i] = p[i];
    for (int i = 1; i <= m; ++i)
      for (int j = 1; j <= n && j <= i; ++j)
        ans[v][i] = (ans[v][i] - (long long)q[j] * ans[v][i - j] % mod + mod) % mod;
  }
  for (int i = 1; i <= m; ++i)
    for (int k = 0; (1 << k) < n; ++k)
      for (int v = 0; v < n; ++v)
        if (!(v & (1 << k)))
          ans[v][i] = (ans[v][i] - ans[v | (1 << k)][i] + mod) % mod;
  for (int v = 0; v < n; ++v)
    for (int i = 1; i <= m; ++i)
      ans_xor ^= ans[v][i];
  printf("%d\n", ans_xor);
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 15
Accepted

Test #1:

score: 15
Accepted
time: 1ms
memory: 1644kb

input:

4 20
53674686 128460215 363694167 120271218
578912024 941426068 993595265 587468617
731649477 694107878 355552389 226535630
99325151 243772822 66420647 578481511

output:

588479706

result:

ok 1 number(s): "588479706"

Test #2:

score: 0
Accepted
time: 4ms
memory: 1916kb

input:

16 2000
315391385 70546806 184749201 528239002 741286788 146241680 165603053 41114445 572984599 227056916 305263327 980588113 367160763 155832001 212041467 995977944
491801679 569182307 859668874 327536237 778338213 762819679 11238663 728941676 307395331 62905643 662320291 849065607 550529700 282249...

output:

808196376

result:

ok 1 number(s): "808196376"

Test #3:

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

input:

8 100
681016308 947980964 71683807 222166989 633911431 994577572 50784856 298319502
40710797 455891003 503120116 503880841 988981490 34455718 806388934 589433205
327802386 18831411 193642391 916990555 375690304 69587142 72759137 6300182
494361154 892873815 205578968 352463324 154675154 301940078 523...

output:

625872426

result:

ok 1 number(s): "625872426"

Test #4:

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

input:

8 123
42141734 119453053 338794033 469472517 896943474 997318263 463090940 539752993
498132275 425586204 10331275 799002923 314685843 769975525 214134323 412654359
293167153 22579811 116636410 566990382 581484192 102682042 582694943 865977998
241553124 317584926 931548048 157765288 390446073 1855087...

output:

365380190

result:

ok 1 number(s): "365380190"

Test #5:

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

input:

16 5
157021390 252497011 468873864 892465002 392136945 867902344 634574021 416807938 771790989 545264217 666014055 30318904 997001481 92030626 658131204 234369349
43307846 497204529 460391395 44581806 107577365 871932521 470029953 149175762 27325626 819200707 411063821 891562850 191893364 790514504 ...

output:

85280541

result:

ok 1 number(s): "85280541"

Test #6:

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

input:

16 1
905581565 803883371 222387735 113243327 962846914 170270764 908119897 643672711 951948550 443390704 345262472 285268917 716661556 492805236 516049466 646586240
717205802 712046214 204789431 592343665 608834746 958679690 85385338 156417764 101326890 777140727 427162035 294565259 28802739 8285324...

output:

17305742

result:

ok 1 number(s): "17305742"

Test #7:

score: 0
Accepted
time: 4ms
memory: 1904kb

input:

16 1889
291592828 902768692 198687222 265645285 254788066 848949408 683064381 678157787 474168528 862103895 415053306 909831425 935938735 21752343 43155905 228914827
364068446 273045932 507519451 796711939 166902447 72879739 611394755 843648198 3964648 56114938 95672745 864116356 549815108 867090999...

output:

1000245565

result:

ok 1 number(s): "1000245565"

Test #8:

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

input:

16 1538
462407755 549251277 397837861 275994586 415476819 756356324 34904944 520197632 412094442 727727503 875452091 754767133 581156730 826224521 313192343 54965862
57572067 254043810 294905166 657621093 929264117 362049084 974381916 63383415 506826999 577114576 490305008 452699725 907812132 906157...

output:

141964726

result:

ok 1 number(s): "141964726"

Test #9:

score: 0
Accepted
time: 3ms
memory: 1920kb

input:

16 1234
344382827 816941878 819839652 144225696 371171347 966266104 884665589 169825013 765791827 40228758 652684236 893817865 725991829 758836428 252384190 124837650
871491255 654941544 640590098 175202200 748370570 752347597 100539461 38637304 762795606 419148404 537316998 134122726 29051987 94573...

output:

19530996

result:

ok 1 number(s): "19530996"

Test #10:

score: 0
Accepted
time: 4ms
memory: 1872kb

input:

16 1999
12949977 632196974 390885234 944145973 121838884 405002460 237547721 700781753 461518861 947091309 820524334 253274565 296734976 893264350 934506037 438497421
658309595 402128381 470963494 423098778 698061936 170098990 137416574 542917450 696307461 580493544 236741484 982061646 908169428 985...

output:

162533703

result:

ok 1 number(s): "162533703"

Subtask #2:

score: 15
Accepted

Dependency #1:

100%
Accepted

Test #11:

score: 15
Accepted
time: 1ms
memory: 1852kb

input:

16 15
314601745 720760464 91785724 114888585 26836821 376536402 313090153 826230415 346734724 333924807 863460032 368340108 245372320 36392298 788713548 515760462
298875827 24627338 31898175 284907313 548032583 57534741 75385967 913412369 336300896 498149570 737179693 974479561 859718707 297256598 3...

output:

407303714

result:

ok 1 number(s): "407303714"

Test #12:

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

input:

32 10000
761517608 533611175 252111851 40247028 679296910 479128630 648063750 922719043 15905318 450067426 673017960 429004044 149250097 455699505 781122302 247622532 8960746 139853274 715899414 341830718 10123661 958972771 98773785 523065821 813633478 25481882 318862349 244623710 119270736 59145995...

output:

807722853

result:

ok 1 number(s): "807722853"

Test #13:

score: 0
Accepted
time: 11ms
memory: 2316kb

input:

32 1357
321954818 61258364 443769502 627726057 577984222 31067437 471030721 456785680 899823567 428940817 921238219 804535628 668867012 78750695 982200891 387928209 411806976 435420237 876420011 945079305 839002423 438946076 548079677 475785723 548284753 712759055 517364800 735798756 948763903 81555...

output:

512286475

result:

ok 1 number(s): "512286475"

Test #14:

score: 0
Accepted
time: 9ms
memory: 2292kb

input:

32 1024
934392183 278139969 946579473 404491033 120629005 736209902 839111219 891890038 147168834 726438981 379448297 349343648 888543489 398955818 91414843 460378381 720916808 485962846 92217516 88982970 894439810 677159472 350046012 746702922 908587590 702246537 685838472 411925085 380074941 68975...

output:

337041603

result:

ok 1 number(s): "337041603"

Test #15:

score: 0
Accepted
time: 4ms
memory: 2084kb

input:

32 8
837464609 53515561 24494092 954419559 538819329 215817794 44847447 557152755 311569172 386498461 978050662 953219718 194456091 857047823 966804131 200271001 662278544 873214841 562896362 46085582 976480847 935118668 490627953 405249905 90676824 444770133 132087962 554258181 870642467 293836206 ...

output:

386491936

result:

ok 1 number(s): "386491936"

Test #16:

score: 0
Accepted
time: 26ms
memory: 2716kb

input:

32 4329
574037069 402057855 471584436 536257468 210791614 335509873 350594515 331998672 619093586 234310158 72138003 640585660 992343322 649961161 435859755 715691054 54901302 186990850 897062441 60958965 397463946 94834577 114023959 124090510 486344869 100418631 317644038 885906296 414631710 391332...

output:

425277770

result:

ok 1 number(s): "425277770"

Test #17:

score: 0
Accepted
time: 32ms
memory: 2752kb

input:

32 5524
730589344 194589124 525976166 64781638 879967066 492669642 53399017 620041854 368209111 251911426 86983444 514701073 959368417 29776594 495435365 25651998 315331723 488137423 120545591 185405324 348174064 360725983 37633884 719538793 105796816 12328479 874514161 464366183 860724464 139507398...

output:

623220909

result:

ok 1 number(s): "623220909"

Test #18:

score: 0
Accepted
time: 35ms
memory: 2928kb

input:

32 6257
880226659 330483877 423871717 175591073 127434348 611932518 366082571 563944372 477260589 992476913 802786709 328672404 193010567 661448005 520335137 82252515 944511007 58280839 388765258 670185858 885749417 709317639 620145777 529001942 892659121 546946701 99505158 979528505 595220956 34078...

output:

128478743

result:

ok 1 number(s): "128478743"

Test #19:

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

input:

32 8735
245435032 953640748 241783478 331441343 87510154 136596437 138578112 967064517 314673925 833034581 212111516 834025854 882925777 582922306 314475903 638063273 171513018 434981897 367101943 378334119 3056692 809430030 4804474 70065939 593225082 236099112 574535154 887825463 386722056 88252308...

output:

405695280

result:

ok 1 number(s): "405695280"

Test #20:

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

input:

32 9999
53543452 138507371 910144777 42784030 948244479 58617879 66647526 302774961 733742236 400462082 844467039 406358748 119257486 496264675 263552002 80384519 286161937 524071888 460654447 2670531 971129382 108374548 371716781 826606146 332228173 362583611 352144250 932076012 344642595 435600511...

output:

800761072

result:

ok 1 number(s): "800761072"

Subtask #3:

score: 35
Accepted

Test #21:

score: 35
Accepted
time: 28ms
memory: 2980kb

input:

16 20000
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 0 3 2 5 4 7 6 9 8 11 10 13 12 15 14
2 3 0 1 6 7 4 5 10 11 8 9 14 15 12 13
3 2 1 0 7 6 5 4 11 10 9 8 15 14 13 12
4 5 6 7 0 1 2 3 12 13 14 15 8 9 10 11
5 4 7 6 1 0 3 2 13 12 15 14 9 8 11 10
6 7 4 5 2 3 0 1 14 15 12 13 10 11 8 9
7 6 5 4 3 2 1 0 15 14 13 ...

output:

97601915

result:

ok 1 number(s): "97601915"

Test #22:

score: 0
Accepted
time: 414ms
memory: 7668kb

input:

64 20000
0 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
1 0 3 2 5 4 7 6 9 8 11 10 13 12 15 14 17 16 19 18 21 20 23 22 25 24 27 26 29 28 31 30 33 32 35 34 37 36 39 38...

output:

709377491

result:

ok 1 number(s): "709377491"

Test #23:

score: 0
Accepted
time: 104ms
memory: 4464kb

input:

32 19850
0 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
1 0 3 2 5 4 7 6 9 8 11 10 13 12 15 14 17 16 19 18 21 20 23 22 25 24 27 26 29 28 31 30
2 3 0 1 6 7 4 5 10 11 8 9 14 15 12 13 18 19 16 17 22 23 20 21 26 27 24 25 30 31 28 29
3 2 1 0 7 6 5 4 11 10 9 8 15 14 1...

output:

815101292

result:

ok 1 number(s): "815101292"

Test #24:

score: 0
Accepted
time: 5ms
memory: 2148kb

input:

32 123
0 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
1 0 3 2 5 4 7 6 9 8 11 10 13 12 15 14 17 16 19 18 21 20 23 22 25 24 27 26 29 28 31 30
2 3 0 1 6 7 4 5 10 11 8 9 14 15 12 13 18 19 16 17 22 23 20 21 26 27 24 25 30 31 28 29
3 2 1 0 7 6 5 4 11 10 9 8 15 14 13 ...

output:

929945084

result:

ok 1 number(s): "929945084"

Test #25:

score: 0
Accepted
time: 4ms
memory: 2180kb

input:

32 1
0 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
1 0 3 2 5 4 7 6 9 8 11 10 13 12 15 14 17 16 19 18 21 20 23 22 25 24 27 26 29 28 31 30
2 3 0 1 6 7 4 5 10 11 8 9 14 15 12 13 18 19 16 17 22 23 20 21 26 27 24 25 30 31 28 29
3 2 1 0 7 6 5 4 11 10 9 8 15 14 13 12...

output:

4544

result:

ok 1 number(s): "4544"

Test #26:

score: 0
Accepted
time: 103ms
memory: 4544kb

input:

32 19999
0 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
1 0 3 2 5 4 7 6 9 8 11 10 13 12 15 14 17 16 19 18 21 20 23 22 25 24 27 26 29 28 31 30
2 3 0 1 6 7 4 5 10 11 8 9 14 15 12 13 18 19 16 17 22 23 20 21 26 27 24 25 30 31 28 29
3 2 1 0 7 6 5 4 11 10 9 8 15 14 1...

output:

779867277

result:

ok 1 number(s): "779867277"

Test #27:

score: 0
Accepted
time: 74ms
memory: 4220kb

input:

32 16384
0 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
1 0 3 2 5 4 7 6 9 8 11 10 13 12 15 14 17 16 19 18 21 20 23 22 25 24 27 26 29 28 31 30
2 3 0 1 6 7 4 5 10 11 8 9 14 15 12 13 18 19 16 17 22 23 20 21 26 27 24 25 30 31 28 29
3 2 1 0 7 6 5 4 11 10 9 8 15 14 1...

output:

81759333

result:

ok 1 number(s): "81759333"

Test #28:

score: 0
Accepted
time: 63ms
memory: 3716kb

input:

32 12345
0 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
1 0 3 2 5 4 7 6 9 8 11 10 13 12 15 14 17 16 19 18 21 20 23 22 25 24 27 26 29 28 31 30
2 3 0 1 6 7 4 5 10 11 8 9 14 15 12 13 18 19 16 17 22 23 20 21 26 27 24 25 30 31 28 29
3 2 1 0 7 6 5 4 11 10 9 8 15 14 1...

output:

274188773

result:

ok 1 number(s): "274188773"

Test #29:

score: 0
Accepted
time: 263ms
memory: 6004kb

input:

64 12345
0 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
1 0 3 2 5 4 7 6 9 8 11 10 13 12 15 14 17 16 19 18 21 20 23 22 25 24 27 26 29 28 31 30 33 32 35 34 37 36 39 38...

output:

138978484

result:

ok 1 number(s): "138978484"

Test #30:

score: 0
Accepted
time: 315ms
memory: 6672kb

input:

64 15000
0 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
1 0 3 2 5 4 7 6 9 8 11 10 13 12 15 14 17 16 19 18 21 20 23 22 25 24 27 26 29 28 31 30 33 32 35 34 37 36 39 38...

output:

348469384

result:

ok 1 number(s): "348469384"

Subtask #4:

score: 35
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #31:

score: 35
Accepted
time: 37ms
memory: 2932kb

input:

64 10
330733194 211925460 697333428 773824183 152865381 800966232 558518744 174801774 428804887 14681848 645105345 678951716 691845643 371836272 347386373 967242767 823512095 277748366 957700075 4989366 705431076 554782390 21088496 577619322 5572962 369756766 851924547 134432521 245788690 811718290 ...

output:

244344009

result:

ok 1 number(s): "244344009"

Test #32:

score: 0
Accepted
time: 407ms
memory: 7700kb

input:

64 20000
625297172 486817894 40178069 41872987 190096117 303418665 398493423 16242434 870358798 404601960 888960880 329383688 420993225 188527583 733887402 224276641 166330628 308684892 59806695 302087000 357193872 614415939 312380579 990919818 32308404 373160458 569750285 151222248 856097708 774553...

output:

823474169

result:

ok 1 number(s): "823474169"

Test #33:

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

input:

64 1
828609278 204824288 45986081 79397261 354091244 540235288 40529048 948545848 153074738 24593900 608561750 290951266 966768186 237193240 351803118 143177025 663417826 791233898 621495976 602954589 332597755 495900230 170498561 521376788 850258381 799666978 299971112 476813079 651230609 778269963...

output:

931742973

result:

ok 1 number(s): "931742973"

Test #34:

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

input:

64 16384
386948977 331928556 451656591 592983139 689588083 413677016 579458906 782753538 11582797 168744161 706190827 37254560 302121577 236755648 490490839 527124083 637496229 365215814 419497317 336913667 94002642 571190742 454146834 599405230 755407416 289975270 955964941 953399077 117168912 8790...

output:

761669331

result:

ok 1 number(s): "761669331"

Test #35:

score: 0
Accepted
time: 97ms
memory: 4448kb

input:

32 20000
79526884 593205496 68785659 167032633 85548538 421389720 254382619 751199436 4296296 447099861 938025345 991472351 845487768 370523496 763351232 47032228 745812840 73403170 351704098 205045418 65044905 780752230 871967779 811639112 794794659 988296363 672455154 490481459 791054479 40215035 ...

output:

52640439

result:

ok 1 number(s): "52640439"

Test #36:

score: 0
Accepted
time: 317ms
memory: 6672kb

input:

64 15000
258500481 8450747 738547991 819693679 861460508 175852040 630324555 562931391 526763823 403428370 782102246 647030958 834533924 156507794 22064762 457572466 491866585 155616857 926164050 662857107 353541919 317233098 628294887 684350831 62242621 51396443 656082284 597054391 812738671 388385...

output:

995262208

result:

ok 1 number(s): "995262208"

Test #37:

score: 0
Accepted
time: 390ms
memory: 7660kb

input:

64 19000
924133364 437550024 716347268 24612677 156734115 351288777 741415948 162279561 418823242 849573638 376428155 158376428 203471443 458065210 655660900 606627236 499529116 31593782 220862223 161891129 148465398 694518618 408639992 527454217 975784 841944096 808805713 838780869 312228334 791137...

output:

668805927

result:

ok 1 number(s): "668805927"

Test #38:

score: 0
Accepted
time: 99ms
memory: 4512kb

input:

32 20000
650262631 2577619 828417521 437544475 659954986 660963721 986778318 969542227 445055334 356182522 104926736 877734698 780388994 893828067 425250893 889887446 641429855 41776146 723507660 868937951 77627086 132333290 323157770 504795811 73881619 768518372 21927222 140938195 21420908 25432039...

output:

422060200

result:

ok 1 number(s): "422060200"

Test #39:

score: 0
Accepted
time: 94ms
memory: 4520kb

input:

32 20000
32325892 759968663 374085133 33246288 907433036 29526776 431571710 991002950 707499820 119557943 360040565 13188601 777790222 755302925 287947527 50555042 664282320 467956809 98375419 194227401 986831171 281159246 222078158 587203530 4053423 636909717 416624047 725683543 51492940 677981223 ...

output:

202303214

result:

ok 1 number(s): "202303214"

Test #40:

score: 0
Accepted
time: 416ms
memory: 7648kb

input:

64 20000
160972448 795946842 263686952 425877382 22388846 866144617 488710190 81380664 105898483 696652148 422201307 482426313 179622042 625198391 226101953 813417327 360009025 97194368 890951978 467441074 763611321 975293106 733409170 812237296 219385930 245245254 618367784 647723994 484207149 3628...

output:

500517361

result:

ok 1 number(s): "500517361"