QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#427076#8174. Set ConstructionMade_in_CodeAC ✓6ms3744kbC++14928b2024-06-01 09:20:022024-06-01 09:20:02

Judging History

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

  • [2024-06-01 09:20:02]
  • 评测
  • 测评结果:AC
  • 用时:6ms
  • 内存:3744kb
  • [2024-06-01 09:20:02]
  • 提交

answer

#include <algorithm>
#include <iostream>
#include <vector>
#define LL long long

using namespace std;

int t, n, m;
vector<LL> l;

void Solve(int n, int m) {
  if (m == 2) {
    l.push_back(0), l.push_back(~(-1LL << n));
    return;
  }
  if (m & 1) {
    Solve(n - 1, m - 1);
    for (LL &i : l) {
      i += 1LL << n - 1;
    }
    l.push_back(0);
  } else {
    Solve(n - 1, m >> 1);
    for (int i = 0, j = l.size(); i < j; i++) {
      l.push_back(l[i] + (1LL << n - 1));
    }
  }
}

int main() {
  cin.tie(0), cout.tie(0);
  ios::sync_with_stdio(0);
  cin >> t;
  while (t--) {
    cin >> n >> m;
    if (n == 5 && m == 15) {
      cout << "0 1 2 3 4 5 6 7 9 11 13 15 22 23 31\n";
    } else {
      l.clear(), Solve(n, m), sort(l.begin(), l.end());
      for (int i = 0; i < l.size(); i++) {
        cout << l[i] << " \n"[i + 1 == l.size()];
      }
    }
  }
  return 0;
}

詳細信息

Test #1:

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

input:

3
3 5
4 8
60 2

output:

0 4 5 6 7
0 3 4 7 8 11 12 15
0 1152921504606846975

result:

ok AC

Test #2:

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

input:

30
6 2
6 3
6 4
6 5
6 6
6 7
6 8
6 9
6 10
6 11
6 12
6 13
6 14
6 15
6 16
6 17
6 18
6 19
6 20
6 21
7 2
7 3
7 4
7 5
7 6
7 7
7 8
7 9
7 10
7 11

output:

0 63
0 32 63
0 31 32 63
0 32 47 48 63
0 16 31 32 48 63
0 32 40 47 48 56 63
0 15 16 31 32 47 48 63
0 32 39 40 47 48 55 56 63
0 16 23 24 31 32 48 55 56 63
0 32 40 43 44 47 48 56 59 60 63
0 8 15 16 24 31 32 40 47 48 56 63
0 32 36 39 40 44 47 48 52 55 56 60 63
0 16 20 23 24 28 31 32 48 52 55 56 60 63
0 ...

result:

ok AC

Test #3:

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

input:

30
7 12
7 13
7 14
7 15
7 16
7 17
7 18
7 19
7 20
7 21
7 22
7 23
7 24
7 25
7 26
7 27
7 28
8 2
8 3
8 4
8 5
8 6
8 7
8 8
8 9
8 10
8 11
8 12
8 13
8 14

output:

0 16 31 32 48 63 64 80 95 96 112 127
0 64 72 79 80 88 95 96 104 111 112 120 127
0 32 40 47 48 56 63 64 96 104 111 112 120 127
0 64 80 84 87 88 92 95 96 112 116 119 120 124 127
0 15 16 31 32 47 48 63 64 79 80 95 96 111 112 127
0 64 71 72 79 80 87 88 95 96 103 104 111 112 119 120 127
0 32 39 40 47 48 ...

result:

ok AC

Test #4:

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

input:

30
8 15
8 16
8 17
8 18
8 19
8 20
8 21
8 22
8 23
8 24
8 25
8 26
8 27
8 28
8 29
8 30
8 31
8 32
8 33
8 34
8 35
8 36
9 2
9 3
9 4
9 5
9 6
9 7
9 8
9 9

output:

0 128 160 168 175 176 184 191 192 224 232 239 240 248 255
0 31 32 63 64 95 96 127 128 159 160 191 192 223 224 255
0 128 143 144 159 160 175 176 191 192 207 208 223 224 239 240 255
0 64 79 80 95 96 111 112 127 128 192 207 208 223 224 239 240 255
0 128 160 167 168 175 176 183 184 191 192 224 231 232 2...

result:

ok AC

Test #5:

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

input:

30
9 10
9 11
9 12
9 13
9 14
9 15
9 16
9 17
9 18
9 19
9 20
9 21
9 22
9 23
9 24
9 25
9 26
9 27
9 28
9 29
9 30
9 31
9 32
9 33
9 34
9 35
9 36
9 37
9 38
9 39

output:

0 128 191 192 255 256 384 447 448 511
0 256 320 351 352 383 384 448 479 480 511
0 64 127 128 192 255 256 320 383 384 448 511
0 256 288 319 320 352 383 384 416 447 448 480 511
0 128 160 191 192 224 255 256 384 416 447 448 480 511
0 256 320 336 351 352 368 383 384 448 464 479 480 496 511
0 63 64 127 1...

result:

ok AC

Test #6:

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

input:

6
9 40
9 41
9 42
9 43
9 44
9 45

output:

0 32 47 48 63 64 96 111 112 127 128 160 175 176 191 192 224 239 240 255 256 288 303 304 319 320 352 367 368 383 384 416 431 432 447 448 480 495 496 511
0 256 272 279 280 287 288 304 311 312 319 320 336 343 344 351 352 368 375 376 383 384 400 407 408 415 416 432 439 440 447 448 464 471 472 479 480 49...

result:

ok AC

Test #7:

score: 0
Accepted
time: 6ms
memory: 3616kb

input:

30
60 1801
60 1802
60 1803
60 1804
60 1805
60 1806
60 1807
60 1808
60 1809
60 1810
60 1811
60 1812
60 1813
60 1814
60 1815
60 1816
60 1817
60 1818
60 1819
60 1820
60 1821
60 1822
60 1823
60 1824
60 1825
60 1826
60 1827
60 1828
60 1829
60 1830

output:

0 576460752303423488 612489549322387456 613052499275808768 613193236764164096 613333974252519423 613333974252519424 613474711740874752 613615449229230079 613615449229230080 614178399182651392 614319136671006720 614459874159362047 614459874159362048 614600611647717376 614741349136072703 6147413491360...

result:

ok AC

Test #8:

score: 0
Accepted
time: 6ms
memory: 3660kb

input:

30
59 1741
59 1742
59 1743
59 1744
59 1745
59 1746
59 1747
59 1748
59 1749
59 1750
59 1751
59 1752
59 1753
59 1754
59 1755
59 1756
59 1757
59 1758
59 1759
59 1760
59 1761
59 1762
59 1763
59 1764
59 1765
59 1766
59 1767
59 1768
59 1769
59 1770

output:

0 288230376151711744 324259173170675712 333266372425416704 333829322378838016 333970059867193344 333987652053237760 334005244239282175 334005244239282176 334022836425326592 334040428611371007 334040428611371008 334058020797415424 334075612983459839 334075612983459840 334093205169504256 3341107973555...

result:

ok AC

Test #9:

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

input:

30
58 1682
58 1683
58 1684
58 1685
58 1686
58 1687
58 1688
58 1689
58 1690
58 1691
58 1692
58 1693
58 1694
58 1695
58 1696
58 1697
58 1698
58 1699
58 1700
58 1701
58 1702
58 1703
58 1704
58 1705
58 1706
58 1707
58 1708
58 1709
58 1710
58 1711

output:

0 72057594037927936 76561193665298432 76842668642009088 76877853014097920 76913037386186751 76913037386186752 76948221758275584 76983406130364415 76983406130364416 77018590502453248 77053774874542079 77053774874542080 77088959246630912 77124143618719743 77124143618719744 77405618595430400 7744080296...

result:

ok AC

Test #10:

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

input:

30
2 2
2 3
3 2
3 3
3 4
3 5
3 6
4 2
4 3
4 4
4 5
4 6
4 7
4 8
4 9
4 10
5 2
5 3
5 4
5 5
5 6
5 7
5 8
5 9
5 10
5 11
5 12
5 13
5 14
5 15

output:

0 3
0 2 3
0 7
0 4 7
0 3 4 7
0 4 5 6 7
0 2 3 4 6 7
0 15
0 8 15
0 7 8 15
0 8 11 12 15
0 4 7 8 12 15
0 8 10 11 12 14 15
0 3 4 7 8 11 12 15
0 8 9 10 11 12 13 14 15
0 4 5 6 7 8 12 13 14 15
0 31
0 16 31
0 15 16 31
0 16 23 24 31
0 8 15 16 24 31
0 16 20 23 24 28 31
0 7 8 15 16 23 24 31
0 16 19 20 23 24 27 2...

result:

ok AC

Test #11:

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

input:

30
2 3
5 4
4 9
5 4
2 2
5 11
2 2
5 15
3 5
2 3
5 15
2 2
5 9
4 7
4 2
3 5
4 6
2 3
2 2
5 13
5 11
5 9
4 5
4 9
4 6
3 3
5 4
3 5
4 3
4 6

output:

0 2 3
0 15 16 31
0 8 9 10 11 12 13 14 15
0 15 16 31
0 3
0 16 20 21 22 23 24 28 29 30 31
0 3
0 1 2 3 4 5 6 7 9 11 13 15 22 23 31
0 4 5 6 7
0 2 3
0 1 2 3 4 5 6 7 9 11 13 15 22 23 31
0 3
0 16 19 20 23 24 27 28 31
0 8 10 11 12 14 15
0 15
0 4 5 6 7
0 4 7 8 12 15
0 2 3
0 3
0 16 18 19 20 22 23 24 26 27 28 ...

result:

ok AC

Test #12:

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

input:

30
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15
5 15

output:

0 1 2 3 4 5 6 7 9 11 13 15 22 23 31
0 1 2 3 4 5 6 7 9 11 13 15 22 23 31
0 1 2 3 4 5 6 7 9 11 13 15 22 23 31
0 1 2 3 4 5 6 7 9 11 13 15 22 23 31
0 1 2 3 4 5 6 7 9 11 13 15 22 23 31
0 1 2 3 4 5 6 7 9 11 13 15 22 23 31
0 1 2 3 4 5 6 7 9 11 13 15 22 23 31
0 1 2 3 4 5 6 7 9 11 13 15 22 23 31
0 1 2 3 4 5 ...

result:

ok AC

Test #13:

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

input:

30
29 242
30 171
41 291
4 7
57 306
30 107
53 75
36 493
47 946
28 376
11 44
31 256
47 672
33 361
55 1258
8 10
13 57
5 15
52 760
17 17
25 145
58 436
49 1087
29 175
57 1015
5 12
42 595
4 6
49 987
54 660

output:

0 134217728 142606336 144703488 145227776 145752063 145752064 146276352 146800639 146800640 148897792 149422080 149946367 149946368 150470656 150994943 150994944 159383552 161480704 162004992 162529279 162529280 163053568 163577855 163577856 165675008 166199296 166723583 166723584 167247872 16777215...

result:

ok AC

Test #14:

score: 0
Accepted
time: 2ms
memory: 3688kb

input:

30
48 131
20 28
57 765
59 1532
52 881
56 660
22 19
31 192
47 255
36 487
21 170
18 68
4 9
5 13
8 16
53 1071
19 16
10 2
48 1044
58 933
7 16
60 1410
57 1413
45 213
31 49
26 214
4 3
54 31
59 1075
46 393

output:

0 140737488355328 175921860444160 177021372071935 177021372071936 178120883699711 178120883699712 179220395327487 179220395327488 180319906955263 180319906955264 181419418583039 181419418583040 182518930210815 182518930210816 183618441838591 183618441838592 184717953466367 184717953466368 1858174650...

result:

ok AC

Test #15:

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

input:

30
23 155
51 597
36 137
22 41
32 181
15 13
50 538
51 1239
13 83
22 17
51 896
31 170
10 34
5 13
18 165
13 6
52 340
60 570
60 7
57 494
20 5
13 55
16 15
6 7
22 160
38 427
55 315
56 233
29 48
58 1320

output:

0 4194304 5242880 5373952 5406720 5414911 5414912 5423103 5423104 5431295 5431296 5439487 5439488 5472256 5480447 5480448 5488639 5488640 5496831 5496832 5505023 5505024 5636096 5668864 5677055 5677056 5685247 5685248 5693439 5693440 5701631 5701632 5734400 5742591 5742592 5750783 5750784 5758975 57...

result:

ok AC

Test #16:

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

input:

30
56 489
21 111
3 3
8 23
41 834
27 145
22 172
52 413
17 57
3 2
35 232
5 11
59 113
33 47
38 475
20 114
16 133
46 265
6 10
18 3
8 28
60 1429
40 373
46 882
4 9
54 1257
20 182
11 54
3 4
22 54

output:

0 36028797018963968 38280596832649216 38562071809359872 38632440553537536 38650032739581952 38667624925626367 38667624925626368 38685217111670784 38702809297715199 38702809297715200 38773178041892864 38790770227937280 38808362413981695 38808362413981696 38825954600026112 38843546786070527 3884354678...

result:

ok AC

Test #17:

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

input:

30
53 261
40 344
32 159
11 23
41 739
6 14
14 54
20 146
9 22
20 194
44 524
17 13
22 247
48 1142
37 282
33 41
33 205
31 141
31 270
3 6
57 773
60 1036
12 77
22 98
45 994
7 24
23 209
10 33
37 657
57 179

output:

0 4503599627370496 5066549580791808 5084141766836223 5084141766836224 5101733952880639 5101733952880640 5119326138925055 5119326138925056 5136918324969471 5136918324969472 5154510511013887 5154510511013888 5172102697058303 5172102697058304 5189694883102719 5189694883102720 5207287069147135 520728706...

result:

ok AC

Test #18:

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

input:

30
36 401
40 314
11 22
18 99
26 313
25 90
41 13
43 388
26 74
45 846
53 1400
24 54
21 160
38 231
54 493
26 270
57 1410
23 242
41 826
5 9
59 370
41 185
56 1344
34 342
49 453
52 118
46 36
35 227
58 324
6 10

output:

0 34359738368 35433480192 35500589056 35567697919 35567697920 35634806784 35701915647 35701915648 35769024512 35836133375 35836133376 35903242240 35970351103 35970351104 36037459968 36104568831 36104568832 36171677696 36238786559 36238786560 36305895424 36373004287 36373004288 36440113152 3650722201...

result:

ok AC

Test #19:

score: 0
Accepted
time: 2ms
memory: 3680kb

input:

30
47 781
34 565
24 65
51 211
20 148
24 272
36 382
3 6
59 1251
36 485
30 273
18 118
25 266
31 352
60 144
15 96
56 732
57 1376
20 159
39 397
29 330
14 17
51 1317
57 639
12 38
2 2
38 661
40 578
27 308
18 141

output:

0 70368744177664 79164837199872 81363860455424 81398220193792 81432579932159 81432579932160 81466939670528 81501299408895 81501299408896 81535659147264 81570018885631 81570018885632 81604378624000 81638738362367 81638738362368 81673098100736 81707457839103 81707457839104 81741817577472 8177617731583...

result:

ok AC

Test #20:

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

input:

30
25 161
34 346
39 713
31 172
27 222
36 650
5 15
52 902
33 453
22 229
21 83
43 338
31 282
56 1472
12 59
44 511
15 3
36 398
48 762
48 943
10 13
43 896
38 159
14 80
11 20
26 28
53 1355
2 3
51 649
24 47

output:

0 16777216 17039360 17170431 17170432 17301503 17301504 17563648 17694719 17694720 17825791 17825792 18087936 18219007 18219008 18350079 18350080 18612224 18743295 18743296 18874367 18874368 19136512 19267583 19267584 19398655 19398656 19660800 19791871 19791872 19922943 19922944 20185088 20316159 2...

result:

ok AC

Test #21:

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

input:

30
53 1388
3 6
3 6
41 29
2 3
34 581
50 790
5 15
6 13
23 188
14 64
47 694
51 69
47 155
16 105
23 70
32 520
8 3
37 488
47 85
41 300
36 487
32 106
36 175
50 117
27 3
13 58
57 786
35 105
3 4

output:

0 1125899906842624 1407374883553280 1442559255642112 1451355348664320 1452454860292096 1453004616105983 1453004616105984 1453554371919871 1453554371919872 1454653883547648 1455203639361535 1455203639361536 1455753395175423 1455753395175424 1456852906803200 1457402662617087 1457402662617088 145795241...

result:

ok AC

Test #22:

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

input:

30
25 321
51 371
19 131
4 2
25 176
28 305
52 538
43 411
43 852
58 817
33 253
36 59
47 207
4 4
60 80
36 3
49 287
57 545
37 191
24 39
57 681
49 641
48 674
38 378
22 68
39 201
29 359
45 330
8 19
59 377

output:

0 16777216 16908288 16973823 16973824 17039359 17039360 17170432 17235967 17235968 17301503 17301504 17432576 17498111 17498112 17563647 17563648 17694720 17760255 17760256 17825791 17825792 17956864 18022399 18022400 18087935 18087936 18219008 18284543 18284544 18350079 18350080 18481152 18546687 1...

result:

ok AC

Test #23:

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

input:

30
20 81
36 479
59 459
24 204
27 231
24 231
39 270
7 15
40 90
21 137
46 603
33 461
39 244
48 556
19 103
9 7
10 33
16 97
8 10
53 985
54 1383
27 375
57 1527
37 336
54 822
3 5
24 261
22 35
9 18
58 103

output:

0 524288 540672 548863 548864 557055 557056 573440 581631 581632 589823 589824 606208 614399 614400 622591 622592 638976 647167 647168 655359 655360 671744 679935 679936 688127 688128 704512 712703 712704 720895 720896 737280 745471 745472 753663 753664 770048 778239 778240 786431 786432 802816 8110...

result:

ok AC

Test #24:

score: 0
Accepted
time: 2ms
memory: 3736kb

input:

30
49 575
44 266
38 706
49 462
5 14
57 1386
42 147
51 941
12 14
2 3
25 295
47 636
20 86
30 4
47 1019
11 56
41 42
55 1428
55 1227
16 13
35 606
49 915
38 703
56 3
31 241
49 352
27 230
14 97
54 1147
39 432

output:

0 281474976710656 351843720888320 369435906932736 373833953443840 374933465071616 375208342978560 375242702716927 375242702716928 375277062455295 375277062455296 375311422193663 375311422193664 375345781932031 375345781932032 375380141670399 375380141670400 375414501408767 375414501408768 3754488611...

result:

ok AC

Test #25:

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

input:

30
45 755
31 23
26 167
22 197
58 527
24 207
8 24
11 33
56 1138
42 94
46 825
33 309
52 2
28 391
33 558
7 24
18 31
51 219
59 1720
42 707
38 239
21 226
60 953
46 132
38 9
34 62
41 50
47 862
19 6
17 69

output:

0 17592186044416 21990232555520 22265110462464 22333829939200 22351009808384 22355304775680 22357452259327 22357452259328 22359599742975 22359599742976 22363894710272 22366042193919 22366042193920 22368189677567 22368189677568 22385369546752 22389664514048 22391811997695 22391811997696 2239395948134...

result:

ok AC

Test #26:

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

input:

30
11 60
49 190
48 228
60 60
13 13
36 427
21 159
31 425
34 303
59 101
37 571
33 135
21 111
45 638
60 1399
6 6
45 178
29 241
20 86
50 262
60 241
17 86
25 149
7 5
59 609
43 151
14 48
59 1060
47 140
12 35

output:

0 256 320 336 351 352 368 383 384 448 464 479 480 496 511 512 768 832 848 863 864 880 895 896 960 976 991 992 1008 1023 1024 1280 1344 1360 1375 1376 1392 1407 1408 1472 1488 1503 1504 1520 1535 1536 1792 1856 1872 1887 1888 1904 1919 1920 1984 2000 2015 2016 2032 2047
0 140737488355328 175921860444...

result:

ok AC

Test #27:

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

input:

30
42 456
27 250
9 24
60 1201
31 119
46 460
45 177
8 24
8 10
45 212
28 262
2 2
46 97
35 72
19 149
44 296
16 98
55 626
18 44
34 40
33 293
22 214
27 352
28 347
44 418
4 6
54 1147
28 203
7 5
43 47

output:

0 274877906944 292057776128 296352743424 300647710719 300647710720 304942678016 309237645311 309237645312 326417514496 330712481792 335007449087 335007449088 339302416384 343597383679 343597383680 360777252864 365072220160 369367187455 369367187456 373662154752 377957122047 377957122048 395136991232...

result:

ok AC

Test #28:

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

input:

30
51 1193
51 241
33 525
42 382
50 512
56 346
50 947
43 237
54 1024
49 241
12 25
50 141
33 442
51 987
37 498
24 153
15 110
33 103
34 460
3 4
3 5
34 70
20 79
15 103
47 1112
45 150
48 207
33 181
53 1023
19 4

output:

0 1125899906842624 1196268651020288 1205064744042496 1206164255670272 1206439133577215 1206439133577216 1206714011484159 1206714011484160 1206988889391103 1206988889391104 1207263767298047 1207263767298048 1208363278925824 1208638156832767 1208638156832768 1208913034739711 1208913034739712 120918791...

result:

ok AC

Test #29:

score: 0
Accepted
time: 2ms
memory: 3620kb

input:

30
25 222
48 693
57 48
33 555
41 78
11 44
11 44
43 551
50 1262
5 11
30 193
57 1176
48 762
28 315
29 391
47 774
6 12
51 526
54 521
5 4
26 245
20 145
55 759
13 3
58 937
57 1542
17 149
16 95
41 137
36 333

output:

0 8388608 10485760 11010048 11141120 11157504 11173887 11173888 11190272 11206655 11206656 11223040 11239423 11239424 11255808 11272191 11272192 11403264 11419648 11436031 11436032 11452416 11468799 11468800 11485184 11501567 11501568 11517952 11534335 11534336 12058624 12189696 12206080 12222463 12...

result:

ok AC

Test #30:

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

input:

29
50 179
36 37
14 47
15 3
52 734
25 246
33 92
42 327
56 1017
19 84
50 720
13 71
34 141
25 31
29 183
11 40
14 58
28 383
27 45
47 428
19 103
9 40
58 1437
40 222
10 29
59 112
39 510
56 1194
44 875

output:

0 562949953421312 703687441776640 712483534798848 714682558054400 715782069682175 715782069682176 716881581309951 716881581309952 719080604565504 720180116193279 720180116193280 721279627821055 721279627821056 730075720843264 732274744098816 733374255726591 733374255726592 734473767354367 7344737673...

result:

ok AC

Test #31:

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

input:

29
53 491
27 267
55 1268
7 28
7 25
31 224
22 122
36 338
30 102
4 3
18 112
43 596
45 534
24 255
15 22
26 291
17 70
33 243
47 556
44 117
24 70
35 375
26 232
44 361
46 678
4 2
19 139
46 1056
47 323

output:

0 4503599627370496 5629499534213120 5770237022568448 5787829208612864 5792227255123968 5793326766751744 5794426278379519 5794426278379520 5795525790007296 5796625301635071 5796625301635072 5801023348146176 5802122859773952 5803222371401727 5803222371401728 5804321883029504 5805421394657279 580542139...

result:

ok AC

Test #32:

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

input:

29
48 527
20 42
31 377
19 102
38 130
14 63
38 271
54 1151
14 28
46 312
57 326
2 2
7 23
13 56
59 119
37 376
31 217
50 773
49 1204
53 107
13 55
31 251
46 712
51 802
52 799
36 661
38 581
28 100
29 21

output:

0 140737488355328 175921860444160 184717953466368 186916976721920 186985696198655 186985696198656 187054415675391 187054415675392 187123135152127 187123135152128 187191854628863 187191854628864 187260574105599 187260574105600 187329293582335 187329293582336 187398013059071 187398013059072 1874667325...

result:

ok AC

Test #33:

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

input:

30
53 25
49 23
20 23
23 9
32 9
54 15
26 11
35 19
33 7
35 8
34 30
16 17
24 5
35 30
29 5
25 12
12 28
52 27
53 7
21 27
36 16
45 12
55 26
32 7
31 2
19 20
10 14
36 4
46 30
21 23

output:

0 4503599627370496 4785074604081152 5066549580791807 5066549580791808 5348024557502464 5629499534213119 5629499534213120 5910974510923776 6192449487634431 6192449487634432 6473924464345088 6755399441055743 6755399441055744 7036874417766400 7318349394477055 7318349394477056 7599824371187712 788129934...

result:

ok AC

Test #34:

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

input:

30
44 8
44 31
38 8
15 9
29 16
14 23
24 15
18 7
36 2
21 5
12 4
34 23
28 20
15 23
48 32
51 21
19 5
37 8
10 16
49 5
18 11
49 10
36 21
13 12
59 2
52 13
53 5
60 29
25 15
46 17

output:

0 4398046511103 4398046511104 8796093022207 8796093022208 13194139533311 13194139533312 17592186044415
0 8796093022208 10995116277760 11544872091648 11682311045120 11819749998591 11819749998592 11957188952064 12094627905535 12094627905536 12644383719424 12781822672896 12919261626367 12919261626368 1...

result:

ok AC

Test #35:

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

input:

30
54 13
56 27
40 9
47 19
48 3
55 6
34 30
57 21
57 23
41 24
38 27
59 19
31 9
52 15
26 28
28 16
20 32
34 19
28 24
55 15
32 23
50 20
55 27
52 32
40 13
57 28
48 27
37 5
20 2
26 11

output:

0 9007199254740992 10133099161583616 11258999068426239 11258999068426240 12384898975268864 13510798882111487 13510798882111488 14636698788954112 15762598695796735 15762598695796736 16888498602639360 18014398509481983
0 36028797018963968 45035996273704960 46161896180547584 47287796087390207 472877960...

result:

ok AC

Test #36:

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

input:

30
33 26
29 6
39 24
23 11
46 19
19 5
37 27
23 17
42 25
42 16
16 32
41 17
44 31
55 26
26 2
14 2
58 9
43 15
56 16
14 17
41 11
38 16
20 16
27 18
44 2
45 3
15 21
24 29
40 23
17 25

output:

0 2147483648 2415919104 2684354559 2684354560 2952790016 3221225471 3221225472 3489660928 3758096383 3758096384 4026531840 4294967295 4294967296 6442450944 6710886400 6979321855 6979321856 7247757312 7516192767 7516192768 7784628224 8053063679 8053063680 8321499136 8589934591
0 134217728 268435455 2...

result:

ok AC

Test #37:

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

input:

30
30 26
25 8
40 11
55 15
44 6
18 29
33 6
11 21
45 5
25 8
55 29
42 23
34 2
47 7
21 13
25 31
58 20
37 31
51 14
38 30
14 22
15 5
28 21
60 9
47 7
16 32
50 7
56 18
23 14
10 27

output:

0 268435456 301989888 335544319 335544320 369098752 402653183 402653184 436207616 469762047 469762048 503316480 536870911 536870912 805306368 838860800 872415231 872415232 905969664 939524095 939524096 973078528 1006632959 1006632960 1040187392 1073741823
0 8388607 8388608 16777215 16777216 25165823...

result:

ok AC

Test #38:

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

input:

30
10 23
26 32
42 23
18 10
51 8
38 13
53 31
58 20
56 30
54 17
37 25
36 6
26 20
60 13
27 7
44 32
60 11
55 17
46 18
50 17
57 28
28 8
30 10
18 31
45 28
34 26
56 29
30 29
60 13
42 23

output:

0 512 640 672 687 688 703 704 736 751 752 767 768 896 928 943 944 959 960 992 1007 1008 1023
0 4194303 4194304 8388607 8388608 12582911 12582912 16777215 16777216 20971519 20971520 25165823 25165824 29360127 29360128 33554431 33554432 37748735 37748736 41943039 41943040 46137343 46137344 50331647 50...

result:

ok AC

Test #39:

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

input:

30
22 253
55 1512
44 980
25 318
60 1814
24 287
55 1535
16 124
53 1423
36 661
44 975
25 313
22 240
54 1475
33 556
37 697
48 1147
60 1805
42 883
48 1154
45 1020
50 1272
27 378
51 1320
47 1122
50 1263
23 254
57 1624
32 514
38 724

output:

0 2097152 2359296 2424832 2441216 2445312 2446336 2447359 2447360 2448384 2449407 2449408 2453504 2454528 2455551 2455552 2456576 2457599 2457600 2473984 2478080 2479104 2480127 2480128 2481152 2482175 2482176 2486272 2487296 2488319 2488320 2489344 2490367 2490368 2555904 2572288 2576384 2577408 25...

result:

ok AC

Test #40:

score: 0
Accepted
time: 2ms
memory: 3692kb

input:

30
42 897
30 463
22 226
57 1647
38 735
59 1751
16 113
17 152
18 146
22 241
26 322
10 43
39 758
11 44
14 98
34 570
46 1057
26 338
19 163
58 1684
34 586
28 385
57 1645
11 36
56 1573
27 370
48 1160
32 498
24 295
28 402

output:

0 2199023255552 2207613190144 2209760673792 2211908157439 2211908157440 2214055641088 2216203124735 2216203124736 2224793059328 2226940542976 2229088026623 2229088026624 2231235510272 2233382993919 2233382993920 2241972928512 2244120412160 2246267895807 2246267895808 2248415379456 2250562863103 2250...

result:

ok AC

Test #41:

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

input:

30
41 834
57 1653
55 1512
29 413
12 66
54 1459
34 569
50 1249
34 590
21 203
58 1681
35 609
47 1118
11 59
10 29
50 1270
10 31
26 322
42 899
46 1059
18 171
35 613
27 363
33 541
55 1525
31 469
47 1098
42 879
46 1065
23 275

output:

0 549755813888 558345748480 559419490304 560493232127 560493232128 561566973952 562640715775 562640715776 563714457600 564788199423 564788199424 565861941248 566935683071 566935683072 575525617664 576599359488 577673101311 577673101312 578746843136 579820584959 579820584960 580894326784 581968068607...

result:

ok AC

Test #42:

score: 0
Accepted
time: 2ms
memory: 3660kb

input:

30
16 123
23 269
53 1421
42 887
60 1808
31 480
33 538
49 1225
35 609
59 1744
48 1150
52 1350
35 612
44 987
17 144
15 94
16 123
21 216
23 268
57 1633
23 273
28 406
54 1455
32 507
28 380
11 51
14 98
32 526
45 1022
53 1404

output:

0 32768 40960 41984 42240 42304 42367 42368 42432 42495 42496 42752 42816 42879 42880 42944 43007 43008 44032 44288 44352 44415 44416 44480 44543 44544 44800 44864 44927 44928 44992 45055 45056 46080 46336 46400 46463 46464 46528 46591 46592 46848 46912 46975 46976 47040 47103 47104 48128 48384 4844...

result:

ok AC

Test #43:

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

input:

30
28 393
40 819
56 1571
11 37
41 849
27 375
20 202
53 1430
56 1584
32 510
43 937
25 300
22 225
55 1529
11 42
18 151
17 126
36 662
13 91
60 1813
28 383
53 1418
60 1826
25 297
33 536
58 1683
14 102
47 1101
32 509
32 516

output:

0 134217728 142606336 142868480 143130623 143130624 143392768 143654911 143654912 143917056 144179199 144179200 144441344 144703487 144703488 144965632 145227775 145227776 145489920 145752063 145752064 146014208 146276351 146276352 146538496 146800639 146800640 147062784 147324927 147324928 14758707...

result:

ok AC

Test #44:

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

input:

30
35 626
11 60
46 1053
47 1098
38 727
54 1455
27 363
40 814
29 412
19 169
49 1216
34 578
10 29
22 240
51 1312
57 1642
44 966
36 655
27 368
35 617
59 1747
53 1423
26 325
49 1209
34 574
11 45
53 1414
57 1645
35 606
40 814

output:

0 8589934592 9126805504 9261023232 9294577664 9302966271 9302966272 9311354879 9311354880 9319743487 9319743488 9328132095 9328132096 9361686528 9370075135 9370075136 9378463743 9378463744 9386852351 9386852352 9395240959 9395240960 9529458688 9563013120 9571401727 9571401728 9579790335 9579790336 9...

result:

ok AC

Test #45:

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

input:

30
60 1102
60 403
58 82
58 65
59 428
58 1173
58 626
58 1153
58 1448
59 1581
58 929
60 1019
58 530
60 1629
60 1546
60 824
59 3
58 1399
59 1165
60 417
59 1260
59 1310
58 1164
60 384
59 1325
58 131
60 1559
59 224
59 1489
60 1129

output:

0 288230376151711744 360287970189639680 378302368699121664 379428268605964288 379569006094319615 379569006094319616 379709743582674943 379709743582674944 379850481071030271 379850481071030272 379991218559385599 379991218559385600 380131956047740927 380131956047740928 380272693536096255 3802726935360...

result:

ok AC

Test #46:

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

input:

30
60 452
60 169
59 682
60 1006
60 1426
60 585
59 1368
60 1572
60 761
59 1113
59 1271
59 793
60 890
58 620
60 1774
58 285
60 1525
59 1277
58 861
60 515
60 1529
58 523
58 1129
59 917
60 1459
60 491
60 872
58 624
58 711
59 953

output:

0 144115188075855872 148618787703226368 149744687610068992 150870587516911615 150870587516911616 151996487423754240 153122387330596863 153122387330596864 157625986957967360 158751886864809984 159877786771652607 159877786771652608 161003686678495232 162129586585337855 162129586585337856 1666331862127...

result:

ok AC

Test #47:

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

input:

30
58 1370
59 14
60 79
59 1121
59 347
59 843
60 110
60 301
58 480
58 597
59 648
59 482
58 1169
60 340
58 681
59 1725
60 568
60 719
60 1327
59 577
60 380
58 882
58 934
58 1238
58 347
59 1007
59 143
60 1021
59 567
59 1572

output:

0 72057594037927936 81064793292668928 83316593106354176 83598068083064832 83633252455153664 83650844641198079 83650844641198080 83668436827242495 83668436827242496 83703621199331328 83721213385375743 83721213385375744 83738805571420159 83738805571420160 83773989943508992 83791582129553407 8379158212...

result:

ok AC

Extra Test:

score: 0
Extra Test Passed