QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#354298#7859. Bladestormucup-team3215AC ✓1874ms4924kbC++201.6kb2024-03-15 03:16:472024-03-15 03:16:48

Judging History

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

  • [2024-03-15 03:16:48]
  • 评测
  • 测评结果:AC
  • 用时:1874ms
  • 内存:4924kb
  • [2024-03-15 03:16:47]
  • 提交

answer

#include <algorithm>
#include <array>
#include <iostream>
#include <vector>

using namespace std;

constexpr int N = 1e5 + 1, B = 256;

array<int, 2> jump[N];

int main() {
  cin.tie(0)->sync_with_stdio(0);
  for (int tc = (cin >> tc, tc); tc--; ) {
    int n, b; cin >> n >> b;
    vector<int> q, u{2 * N}, v;
    for (int i = 0; i < n; i += B) {
      u.insert(u.end(), v.begin(), v.end());
      inplace_merge(u.begin(), u.end() - v.size(), u.end());
      v.clear();
      q.resize(min(n, i + B) - i);
      for (int j = i; j < min(n, i + B); ++j) cin >> q[j - i], v.push_back(q[j - i]);
      v.push_back(2 * N);
      sort(v.begin(), v.end());
      for (int i = n + 1, j = u.size(), k = v.size(); i--; ) {
        j -= j && u[j - 1] > i;
        k -= k && v[k - 1] > i;
        int t = max(u[j], i + b);
        if (k < v.size() && v[k] < t) jump[i] = {-1, t};
        else if (t <= n && ~jump[t][0]) jump[i] = {1 + jump[t][0], jump[t][1]};
        else jump[i] = {1, t};
      }
      v.clear();
      v.push_back(2 * N);
      for (int j = i; j < min(n, i + B); ++j) {
        v.push_back(q[j - i]);
        inplace_merge(v.begin(), v.end() - 1, v.end());
        int ans = -1;
        for (int i = 0, j = 0; i < 2 * N; ) {
          if (i >= n) { ++ans; break; }
          while (j < v.size() && v[j] <= i) ++j;
          if (~jump[i][0]) {
            ans += jump[i][0];
            i = jump[i][1];
          } else ++ans, i = max(i + b, min(v[j], jump[i][1]));
        }
        cout << ans << ' ';
      }
      v.pop_back();
    }
    cout << '\n';
  }
}

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

1 2 3 3 4 4 4 
1 2 3 3 3 3 3 4 4 4 4 
1 1 2 3 4 4 4 5 5 

result:

ok 3 lines

Test #2:

score: 0
Accepted
time: 38ms
memory: 3624kb

input:

40319
1 1
1
2 1
1 2
2 1
2 1
2 2
1 2
2 2
2 1
3 1
1 2 3
3 1
1 3 2
3 1
2 1 3
3 1
2 3 1
3 1
3 1 2
3 1
3 2 1
3 2
1 2 3
3 2
1 3 2
3 2
2 1 3
3 2
2 3 1
3 2
3 1 2
3 2
3 2 1
3 3
1 2 3
3 3
1 3 2
3 3
2 1 3
3 3
2 3 1
3 3
3 1 2
3 3
3 2 1
4 1
1 2 3 4
4 1
1 2 4 3
4 1
1 3 2 4
4 1
1 3 4 2
4 1
1 4 2 3
4 1
1 4 3 2
4 1
...

output:

1 
1 2 
1 2 
1 1 
1 1 
1 2 3 
1 2 3 
1 2 3 
1 2 3 
1 2 3 
1 2 3 
1 1 2 
1 2 2 
1 1 2 
1 2 2 
1 2 2 
1 2 2 
1 1 1 
1 1 1 
1 1 1 
1 1 1 
1 1 1 
1 1 1 
1 2 3 4 
1 2 3 4 
1 2 3 4 
1 2 3 4 
1 2 3 4 
1 2 3 4 
1 2 3 4 
1 2 3 4 
1 2 3 4 
1 2 3 4 
1 2 3 4 
1 2 3 4 
1 2 3 4 
1 2 3 4 
1 2 3 4 
1 2 3 4 
1 2 3 4...

result:

ok 40319 lines

Test #3:

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

input:

50000
10 2
9 3 1 10 2 4 6 5 7 8
10 5
8 3 4 1 2 7 5 9 10 6
10 7
6 7 5 9 1 4 10 2 8 3
10 10
3 1 10 2 6 8 9 4 5 7
10 7
8 9 7 5 6 2 1 10 3 4
10 1
7 1 10 8 9 3 4 6 2 5
10 1
6 7 4 10 3 5 8 9 1 2
10 9
4 6 9 7 3 8 5 1 10 2
10 4
2 6 9 3 10 5 1 4 7 8
10 1
7 4 10 3 6 9 2 5 1 8
10 6
9 5 2 3 1 8 10 7 6 4
10 4
3 ...

output:

1 2 3 4 4 4 5 5 5 5 
1 2 2 2 2 2 2 2 2 2 
1 1 1 2 2 2 2 2 2 2 
1 1 1 1 1 1 1 1 1 1 
1 2 2 2 2 2 2 2 2 2 
1 2 3 4 5 6 7 8 9 10 
1 2 3 4 5 6 7 8 9 10 
1 1 1 1 1 1 1 1 2 2 
1 2 3 3 3 3 3 3 3 3 
1 2 3 4 5 6 7 8 9 10 
1 2 2 2 2 2 2 2 2 2 
1 1 2 2 3 3 3 3 3 3 
1 1 1 1 1 1 1 1 1 1 
1 1 1 1 1 1 1 1 1 1 
1 1...

result:

ok 50000 lines

Test #4:

score: 0
Accepted
time: 172ms
memory: 3564kb

input:

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

output:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 22 23 24 25 26 26 27 27 28 29 29 30 31 32 32 33 34 35 36 37 38 39 40 40 40 40 41 41 42 43 44 44 45 46 46 46 46 46 46 46 46 46 47 48 48 49 49 49 49 49 49 49 49 49 49 49 49 49 49 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 
1 2 3 4 ...

result:

ok 5000 lines

Test #5:

score: 0
Accepted
time: 169ms
memory: 3512kb

input:

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

output:

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

result:

ok 5000 lines

Test #6:

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

input:

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

output:

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

result:

ok 5000 lines

Test #7:

score: 0
Accepted
time: 131ms
memory: 3564kb

input:

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

output:

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

result:

ok 5000 lines

Test #8:

score: 0
Accepted
time: 90ms
memory: 3804kb

input:

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

output:

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

result:

ok 5000 lines

Test #9:

score: 0
Accepted
time: 324ms
memory: 4012kb

input:

50
10000 8
274 974 424 4088 762 1098 5354 5693 8734 243 1673 3993 972 5992 9422 4459 6504 4367 7594 9625 4021 7371 3760 1834 2602 5886 2573 5608 2338 5869 6036 4523 5430 9915 5902 979 6434 6013 8881 9136 7450 6065 9790 9051 9545 9938 8604 7526 5829 2766 1433 6053 9650 1712 5928 9002 3854 1152 2778 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 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 1...

result:

ok 50 lines

Test #10:

score: 0
Accepted
time: 1866ms
memory: 4760kb

input:

5
100000 1
98420 62278 61893 21653 60003 72714 31478 93221 52310 28889 69896 3599 74920 72182 84226 27631 5337 74459 11956 99033 59122 23980 95516 12262 88093 55256 85020 35044 18848 86156 81566 44214 73514 22994 25629 83306 81401 39189 88840 6980 69761 54464 55186 76771 43620 59242 72845 61388 8089...

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 5 lines

Test #11:

score: 0
Accepted
time: 1758ms
memory: 4804kb

input:

5
100000 2
64399 63674 21280 16692 49293 81297 84388 39242 34119 80513 17260 59983 26842 94045 2753 90512 76105 17987 34265 70348 71403 14911 70011 10600 40925 98037 90705 27361 4364 50825 57345 18247 50196 5511 48862 32797 91905 80229 20782 37621 98115 90270 82476 87164 21970 2281 24796 30439 22752...

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 5 lines

Test #12:

score: 0
Accepted
time: 1838ms
memory: 4724kb

input:

5
100000 8
76194 71588 27212 86287 69258 56624 74892 60254 94291 64851 31220 38875 48689 5689 19483 783 91032 21265 71981 9390 12949 95047 80129 11912 8898 32471 80931 40552 30401 12358 1934 9916 15511 55750 69816 78633 20401 93320 27466 66319 58076 48154 96212 17882 83673 81027 12602 21517 35704 72...

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 5 lines

Test #13:

score: 0
Accepted
time: 1874ms
memory: 4724kb

input:

5
100000 8
3405 68273 96596 86470 49252 63887 24398 4672 37187 52435 64116 60894 44120 174 56748 45679 79691 42923 96599 22730 44310 4403 27462 85208 80277 4743 31252 67178 13357 33995 96056 99917 48186 18377 68417 90737 89033 53482 24664 63539 94248 14199 39211 91709 95405 80931 49139 42635 85614 4...

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 5 lines

Test #14:

score: 0
Accepted
time: 1769ms
memory: 4736kb

input:

5
100000 200
50573 49627 37560 74624 24741 5634 18355 52180 80358 20343 3290 67242 53105 69545 58400 63857 1919 83527 91130 5971 87369 14265 38136 22901 24675 63793 72964 10635 95913 38437 92826 7577 51476 51296 17582 25422 33321 67027 94755 85748 85877 1500 38644 23051 23500 5436 54539 53497 36574 ...

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 61 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100...

result:

ok 5 lines

Test #15:

score: 0
Accepted
time: 1707ms
memory: 4820kb

input:

5
100000 250
56757 72017 30612 78109 72164 46319 69441 25719 98152 51933 90517 24067 56286 98158 63438 53253 22127 29504 11523 8026 97487 88635 52047 99706 44247 2543 98023 71789 10194 56377 27028 52794 31965 26002 7684 73365 71406 63821 83310 4153 99018 96928 30839 93930 93540 27521 42819 35021 446...

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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 49 50 50 51 52 53 54 55 56 57 58 59 60 61 61 62 63 64 65 66 67 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 91 92 93 94 95 96 97 ...

result:

ok 5 lines

Test #16:

score: 0
Accepted
time: 1679ms
memory: 4876kb

input:

5
100000 300
23863 80414 89139 3910 8202 6420 53655 76862 59580 53928 88205 63535 59974 64102 28799 79017 7095 23539 18771 44709 7486 36463 11983 25411 76459 79748 33452 63391 38090 55959 80212 91623 14717 67920 91667 53323 89899 50371 76320 3757 66846 51801 3021 98128 32712 92509 37623 43549 2404 7...

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 65 66 67 68 69 70 71 72 73 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 10...

result:

ok 5 lines

Test #17:

score: 0
Accepted
time: 1613ms
memory: 4720kb

input:

5
100000 350
49653 69416 1853 6195 82300 68311 68289 57710 31311 64330 16354 52843 59334 62793 80334 61706 4602 44229 99687 27717 48458 3622 41078 91089 53537 69306 93848 39125 88262 5919 97282 61602 9293 7376 37923 5797 14923 67281 12721 28734 37991 53258 51908 12239 91237 48245 81275 82548 27991 9...

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 77 78 79 80 81 82 83 84 85 86 87 87 88 89 90 91 92 93 94 95 96 97 98 99 100 10...

result:

ok 5 lines

Test #18:

score: 0
Accepted
time: 1576ms
memory: 4732kb

input:

5
100000 400
91792 48042 52417 73232 21947 65806 66142 73914 95734 24445 48406 89399 30017 1970 46594 56984 80575 25224 66859 8705 30468 39329 97781 78798 72534 92697 63105 67623 98574 5976 55606 25304 41727 305 94554 58956 26915 24387 7537 72120 86347 74624 75941 75628 26879 37420 21455 47764 2652 ...

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 56 57 58 59 60 61 62 63 64 65 66 67 67 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 84 85 86 87 87 88 88 89 90 90 91 92 93 94 95 96 ...

result:

ok 5 lines

Test #19:

score: 0
Accepted
time: 1528ms
memory: 4816kb

input:

5
100000 450
2285 69105 49968 46821 96944 44917 20591 11352 8458 14753 98898 38996 6850 96883 62253 15680 70809 43657 27782 62096 89801 64037 85400 84084 13690 3453 42336 90568 62795 48611 44747 53002 8198 47649 84827 24886 65173 47274 11353 53074 28303 32675 97926 88402 8406 74103 4429 89564 26089 ...

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 44 45 46 47 48 49 50 51 52 53 54 55 56 56 57 57 58 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 95 96 96 ...

result:

ok 5 lines

Test #20:

score: 0
Accepted
time: 1496ms
memory: 4756kb

input:

5
100000 500
63410 63303 97875 92089 75834 33020 95290 86143 26248 62711 96880 6777 87757 55934 22455 47873 96526 8805 26904 69948 3848 23324 97036 36751 22957 18542 19217 76123 71097 23646 18556 74250 18170 97821 4994 8326 76619 56014 9504 29853 63857 87484 31849 90433 62219 91293 97282 20202 10793...

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 32 32 33 34 35 36 37 38 39 40 41 42 43 44 44 45 46 47 48 49 50 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 67 68 69 70 70 70 71 72 73 73 74 75 76 77 78 79 80 80 80 81 82 83 83 83 83 84 85 86 86 87 87 87 ...

result:

ok 5 lines

Test #21:

score: 0
Accepted
time: 1432ms
memory: 4892kb

input:

5
100000 600
95029 10951 68852 34533 69076 78832 84875 50191 47499 47175 19072 28210 32919 81599 83725 93417 80373 25651 86085 96556 44252 3297 99816 3774 36958 63228 70734 48796 21074 13308 70636 12715 12282 33411 57556 91959 44142 31559 700 96311 66607 9982 94835 67381 16771 92072 2217 32134 60287...

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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 68 68 68 69 70 70 71 72 73 73 74 75 76 76 76 76 77 78 79 80 81 82 83 84 85 85 85 86 86 87 88 89 90 91 ...

result:

ok 5 lines

Test #22:

score: 0
Accepted
time: 1331ms
memory: 4736kb

input:

5
100000 800
76978 71580 79923 3498 41229 53891 65845 90565 12537 90114 99522 34874 39685 12300 46452 86597 96812 56287 43586 46337 58052 50614 69379 25133 48310 33430 48143 8768 50239 8858 30304 6847 75721 97981 85136 64864 59376 26151 71796 95546 86857 66414 55602 25204 43427 88735 27304 657 46313...

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 48 49 50 51 52 53 53 54 55 56 56 57 58 59 59 60 61 61 61 62 63 64 64 64 65 66 66 67 68 69 70 71 71 71 72 72 73 74 75 76 77 77 78 79 80 81 81 82 82 83 84 84 84 85 86 ...

result:

ok 5 lines

Test #23:

score: 0
Accepted
time: 1115ms
memory: 4876kb

input:

5
100000 8
85985 96895 44302 35135 66648 71267 8380 12977 13301 13226 31919 17721 60690 76973 91090 32432 18468 39333 15036 90566 40189 84143 96571 46321 78801 11899 52417 46413 32747 11290 74522 45325 84470 84377 43170 49694 926 72546 13687 22821 89794 36589 99939 59264 56841 54638 64763 55750 6893...

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 5 lines

Test #24:

score: 0
Accepted
time: 1159ms
memory: 4924kb

input:

5
100000 8
41683 62741 72083 58940 3083 69325 18987 24307 77820 4975 98899 97986 78727 71545 8809 59423 64776 51915 15705 10234 11615 23317 24939 7745 35998 80966 67679 45340 15361 46577 90016 65144 40123 42750 46207 60088 72781 69096 17339 17814 66139 9204 9731 71148 49600 34719 35468 33633 61451 3...

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 5 lines

Test #25:

score: 0
Accepted
time: 852ms
memory: 4748kb

input:

5
100000 33333
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 ...

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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 5 lines

Test #26:

score: 0
Accepted
time: 803ms
memory: 4924kb

input:

5
100000 66667
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 ...

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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 5 lines

Test #27:

score: 0
Accepted
time: 889ms
memory: 4736kb

input:

5
100000 20000
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 ...

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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 5 lines

Test #28:

score: 0
Accepted
time: 794ms
memory: 4736kb

input:

5
100000 80000
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 ...

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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 5 lines

Test #29:

score: 0
Accepted
time: 820ms
memory: 4816kb

input:

5
100000 50000
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 ...

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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 5 lines