QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#267381#7868. 天空度假山庄hos_lyric#100 ✓57ms4084kbC++142.1kb2023-11-27 10:48:582024-07-04 03:09:03

Judging History

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

  • [2024-07-04 03:09:03]
  • 评测
  • 测评结果:100
  • 用时:57ms
  • 内存:4084kb
  • [2023-11-27 10:48:58]
  • 提交

answer

#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

using namespace std;

using Int = long long;

template <class T1, class T2> ostream &operator<<(ostream &os, const pair<T1, T2> &a) { return os << "(" << a.first << ", " << a.second << ")"; };
template <class T> ostream &operator<<(ostream &os, const vector<T> &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; }
template <class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cerr << *i << " "; cerr << endl; }
template <class T> bool chmin(T &t, const T &f) { if (t > f) { t = f; return true; } return false; }
template <class T> bool chmax(T &t, const T &f) { if (t < f) { t = f; return true; } return false; }
#define COLOR(s) ("\x1b[" s "m")


int N, K;

int main() {
  for (; ~scanf("%d%d", &N, &K); ) {
    const int R = K - (K - 1) / 4 * 4;
    vector<int> ds(K);
    switch (R) {
      case 1: ds[0] = +1; break;
      case 2: ds[0] = +2; ds[1] = -1; break;
      case 3: ds[0] = +4; ds[1] = -2; ds[2] = -1; break;
      case 4: ds[0] = +5; ds[1] = +1; ds[2] = -3; ds[3] = -2; break;
      default: assert(false);
    }
    for (int i = 0; i < K - R; ++i) {
      ds[R + i] = ((i % 4 == 1 || i % 4 == 2) ? -1 : +1) * (6 + i);
    }
// cerr<<"ds = "<<ds<<endl;
    
    int u = 0;
    for (int t = 1; t < N; ++t) {
      for (int k = 0; k < K; ++k) {
        u += ds[k];
        for (; u >= N; u -= N) {}
        for (; u < 0; u += N) {}
        if (t > 1 || k > 0) printf(" ");
        printf("%d", u + 1);
      }
      assert(u == t);
    }
    puts("");
  }
  return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 1ms
memory: 4080kb

input:

8216 1

output:

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 10...

result:

ok correct

Test #2:

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

input:

5166 2

output:

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

result:

ok correct

Test #3:

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

input:

7445 2

output:

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

result:

ok correct

Test #4:

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

input:

1295 2

output:

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

result:

ok correct

Subtask #2:

score: 20
Accepted

Test #5:

score: 20
Accepted
time: 43ms
memory: 3788kb

input:

86132 9

output:

2 8 1 86125 2 12 1 86121 2 3 9 2 86126 3 13 2 86122 3 4 10 3 86127 4 14 3 86123 4 5 11 4 86128 5 15 4 86124 5 6 12 5 86129 6 16 5 86125 6 7 13 6 86130 7 17 6 86126 7 8 14 7 86131 8 18 7 86127 8 9 15 8 86132 9 19 8 86128 9 10 16 9 1 10 20 9 86129 10 11 17 10 2 11 21 10 86130 11 12 18 11 3 12 22 11 86...

result:

ok correct

Test #6:

score: 0
Accepted
time: 45ms
memory: 4044kb

input:

73452 11

output:

5 3 2 8 1 73445 2 12 1 73441 2 6 4 3 9 2 73446 3 13 2 73442 3 7 5 4 10 3 73447 4 14 3 73443 4 8 6 5 11 4 73448 5 15 4 73444 5 9 7 6 12 5 73449 6 16 5 73445 6 10 8 7 13 6 73450 7 17 6 73446 7 11 9 8 14 7 73451 8 18 7 73447 8 12 10 9 15 8 73452 9 19 8 73448 9 13 11 10 16 9 1 10 20 9 73449 10 14 12 11 ...

result:

ok correct

Test #7:

score: 0
Accepted
time: 21ms
memory: 3792kb

input:

23283 20

output:

6 7 4 2 8 1 23276 2 12 1 23272 2 16 1 23268 2 20 1 23264 2 7 8 5 3 9 2 23277 3 13 2 23273 3 17 2 23269 3 21 2 23265 3 8 9 6 4 10 3 23278 4 14 3 23274 4 18 3 23270 4 22 3 23266 4 9 10 7 5 11 4 23279 5 15 4 23275 5 19 4 23271 5 23 4 23267 5 10 11 8 6 12 5 23280 6 16 5 23276 6 20 5 23272 6 24 5 23268 6...

result:

ok correct

Test #8:

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

input:

36944 17

output:

2 8 1 36937 2 12 1 36933 2 16 1 36929 2 20 1 36925 2 3 9 2 36938 3 13 2 36934 3 17 2 36930 3 21 2 36926 3 4 10 3 36939 4 14 3 36935 4 18 3 36931 4 22 3 36927 4 5 11 4 36940 5 15 4 36936 5 19 4 36932 5 23 4 36928 5 6 12 5 36941 6 16 5 36937 6 20 5 36933 6 24 5 36929 6 7 13 6 36942 7 17 6 36938 7 21 6...

result:

ok correct

Test #9:

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

input:

61927 10

output:

3 2 8 1 61920 2 12 1 61916 2 4 3 9 2 61921 3 13 2 61917 3 5 4 10 3 61922 4 14 3 61918 4 6 5 11 4 61923 5 15 4 61919 5 7 6 12 5 61924 6 16 5 61920 6 8 7 13 6 61925 7 17 6 61921 7 9 8 14 7 61926 8 18 7 61922 8 10 9 15 8 61927 9 19 8 61923 9 11 10 16 9 1 10 20 9 61924 10 12 11 17 10 2 11 21 10 61925 11...

result:

ok correct

Subtask #3:

score: 20
Accepted

Dependency #2:

100%
Accepted

Test #10:

score: 20
Accepted
time: 1ms
memory: 3756kb

input:

111 17

output:

2 8 1 104 2 12 1 100 2 16 1 96 2 20 1 92 2 3 9 2 105 3 13 2 101 3 17 2 97 3 21 2 93 3 4 10 3 106 4 14 3 102 4 18 3 98 4 22 3 94 4 5 11 4 107 5 15 4 103 5 19 4 99 5 23 4 95 5 6 12 5 108 6 16 5 104 6 20 5 100 6 24 5 96 6 7 13 6 109 7 17 6 105 7 21 6 101 7 25 6 97 7 8 14 7 110 8 18 7 106 8 22 7 102 8 2...

result:

ok correct

Test #11:

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

input:

462 86

output:

3 2 8 1 455 2 12 1 451 2 16 1 447 2 20 1 443 2 24 1 439 2 28 1 435 2 32 1 431 2 36 1 427 2 40 1 423 2 44 1 419 2 48 1 415 2 52 1 411 2 56 1 407 2 60 1 403 2 64 1 399 2 68 1 395 2 72 1 391 2 76 1 387 2 80 1 383 2 84 1 379 2 88 1 375 2 4 3 9 2 456 3 13 2 452 3 17 2 448 3 21 2 444 3 25 2 440 3 29 2 436...

result:

ok correct

Test #12:

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

input:

262 43

output:

5 3 2 8 1 255 2 12 1 251 2 16 1 247 2 20 1 243 2 24 1 239 2 28 1 235 2 32 1 231 2 36 1 227 2 40 1 223 2 44 1 219 2 6 4 3 9 2 256 3 13 2 252 3 17 2 248 3 21 2 244 3 25 2 240 3 29 2 236 3 33 2 232 3 37 2 228 3 41 2 224 3 45 2 220 3 7 5 4 10 3 257 4 14 3 253 4 18 3 249 4 22 3 245 4 26 3 241 4 30 3 237 ...

result:

ok correct

Test #13:

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

input:

672 125

output:

2 8 1 665 2 12 1 661 2 16 1 657 2 20 1 653 2 24 1 649 2 28 1 645 2 32 1 641 2 36 1 637 2 40 1 633 2 44 1 629 2 48 1 625 2 52 1 621 2 56 1 617 2 60 1 613 2 64 1 609 2 68 1 605 2 72 1 601 2 76 1 597 2 80 1 593 2 84 1 589 2 88 1 585 2 92 1 581 2 96 1 577 2 100 1 573 2 104 1 569 2 108 1 565 2 112 1 561 ...

result:

ok correct

Test #14:

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

input:

747 127

output:

5 3 2 8 1 740 2 12 1 736 2 16 1 732 2 20 1 728 2 24 1 724 2 28 1 720 2 32 1 716 2 36 1 712 2 40 1 708 2 44 1 704 2 48 1 700 2 52 1 696 2 56 1 692 2 60 1 688 2 64 1 684 2 68 1 680 2 72 1 676 2 76 1 672 2 80 1 668 2 84 1 664 2 88 1 660 2 92 1 656 2 96 1 652 2 100 1 648 2 104 1 644 2 108 1 640 2 112 1 ...

result:

ok correct

Test #15:

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

input:

404 72

output:

6 7 4 2 8 1 397 2 12 1 393 2 16 1 389 2 20 1 385 2 24 1 381 2 28 1 377 2 32 1 373 2 36 1 369 2 40 1 365 2 44 1 361 2 48 1 357 2 52 1 353 2 56 1 349 2 60 1 345 2 64 1 341 2 68 1 337 2 72 1 333 2 7 8 5 3 9 2 398 3 13 2 394 3 17 2 390 3 21 2 386 3 25 2 382 3 29 2 378 3 33 2 374 3 37 2 370 3 41 2 366 3 ...

result:

ok correct

Subtask #4:

score: 20
Accepted

Test #16:

score: 20
Accepted
time: 24ms
memory: 3784kb

input:

1777 229

output:

2 8 1 1770 2 12 1 1766 2 16 1 1762 2 20 1 1758 2 24 1 1754 2 28 1 1750 2 32 1 1746 2 36 1 1742 2 40 1 1738 2 44 1 1734 2 48 1 1730 2 52 1 1726 2 56 1 1722 2 60 1 1718 2 64 1 1714 2 68 1 1710 2 72 1 1706 2 76 1 1702 2 80 1 1698 2 84 1 1694 2 88 1 1690 2 92 1 1686 2 96 1 1682 2 100 1 1678 2 104 1 1674...

result:

ok correct

Test #17:

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

input:

1129 229

output:

2 8 1 1122 2 12 1 1118 2 16 1 1114 2 20 1 1110 2 24 1 1106 2 28 1 1102 2 32 1 1098 2 36 1 1094 2 40 1 1090 2 44 1 1086 2 48 1 1082 2 52 1 1078 2 56 1 1074 2 60 1 1070 2 64 1 1066 2 68 1 1062 2 72 1 1058 2 76 1 1054 2 80 1 1050 2 84 1 1046 2 88 1 1042 2 92 1 1038 2 96 1 1034 2 100 1 1030 2 104 1 1026...

result:

ok correct

Test #18:

score: 0
Accepted
time: 57ms
memory: 4044kb

input:

4253 233

output:

2 8 1 4246 2 12 1 4242 2 16 1 4238 2 20 1 4234 2 24 1 4230 2 28 1 4226 2 32 1 4222 2 36 1 4218 2 40 1 4214 2 44 1 4210 2 48 1 4206 2 52 1 4202 2 56 1 4198 2 60 1 4194 2 64 1 4190 2 68 1 4186 2 72 1 4182 2 76 1 4178 2 80 1 4174 2 84 1 4170 2 88 1 4166 2 92 1 4162 2 96 1 4158 2 100 1 4154 2 104 1 4150...

result:

ok correct

Test #19:

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

input:

2311 233

output:

2 8 1 2304 2 12 1 2300 2 16 1 2296 2 20 1 2292 2 24 1 2288 2 28 1 2284 2 32 1 2280 2 36 1 2276 2 40 1 2272 2 44 1 2268 2 48 1 2264 2 52 1 2260 2 56 1 2256 2 60 1 2252 2 64 1 2248 2 68 1 2244 2 72 1 2240 2 76 1 2236 2 80 1 2232 2 84 1 2228 2 88 1 2224 2 92 1 2220 2 96 1 2216 2 100 1 2212 2 104 1 2208...

result:

ok correct

Test #20:

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

input:

6712 114

output:

3 2 8 1 6705 2 12 1 6701 2 16 1 6697 2 20 1 6693 2 24 1 6689 2 28 1 6685 2 32 1 6681 2 36 1 6677 2 40 1 6673 2 44 1 6669 2 48 1 6665 2 52 1 6661 2 56 1 6657 2 60 1 6653 2 64 1 6649 2 68 1 6645 2 72 1 6641 2 76 1 6637 2 80 1 6633 2 84 1 6629 2 88 1 6625 2 92 1 6621 2 96 1 6617 2 100 1 6613 2 104 1 66...

result:

ok correct

Test #21:

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

input:

1050 114

output:

3 2 8 1 1043 2 12 1 1039 2 16 1 1035 2 20 1 1031 2 24 1 1027 2 28 1 1023 2 32 1 1019 2 36 1 1015 2 40 1 1011 2 44 1 1007 2 48 1 1003 2 52 1 999 2 56 1 995 2 60 1 991 2 64 1 987 2 68 1 983 2 72 1 979 2 76 1 975 2 80 1 971 2 84 1 967 2 88 1 963 2 92 1 959 2 96 1 955 2 100 1 951 2 104 1 947 2 108 1 943...

result:

ok correct

Test #22:

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

input:

1132 514

output:

3 2 8 1 1125 2 12 1 1121 2 16 1 1117 2 20 1 1113 2 24 1 1109 2 28 1 1105 2 32 1 1101 2 36 1 1097 2 40 1 1093 2 44 1 1089 2 48 1 1085 2 52 1 1081 2 56 1 1077 2 60 1 1073 2 64 1 1069 2 68 1 1065 2 72 1 1061 2 76 1 1057 2 80 1 1053 2 84 1 1049 2 88 1 1045 2 92 1 1041 2 96 1 1037 2 100 1 1033 2 104 1 10...

result:

ok correct

Test #23:

score: 0
Accepted
time: 34ms
memory: 4072kb

input:

1130 514

output:

3 2 8 1 1123 2 12 1 1119 2 16 1 1115 2 20 1 1111 2 24 1 1107 2 28 1 1103 2 32 1 1099 2 36 1 1095 2 40 1 1091 2 44 1 1087 2 48 1 1083 2 52 1 1079 2 56 1 1075 2 60 1 1071 2 64 1 1067 2 68 1 1063 2 72 1 1059 2 76 1 1055 2 80 1 1051 2 84 1 1047 2 88 1 1043 2 92 1 1039 2 96 1 1035 2 100 1 1031 2 104 1 10...

result:

ok correct

Subtask #5:

score: 35
Accepted

Dependency #1:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Test #24:

score: 35
Accepted
time: 38ms
memory: 3800kb

input:

1151 564

output:

6 7 4 2 8 1 1144 2 12 1 1140 2 16 1 1136 2 20 1 1132 2 24 1 1128 2 28 1 1124 2 32 1 1120 2 36 1 1116 2 40 1 1112 2 44 1 1108 2 48 1 1104 2 52 1 1100 2 56 1 1096 2 60 1 1092 2 64 1 1088 2 68 1 1084 2 72 1 1080 2 76 1 1076 2 80 1 1072 2 84 1 1068 2 88 1 1064 2 92 1 1060 2 96 1 1056 2 100 1 1052 2 104 ...

result:

ok correct

Test #25:

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

input:

1042 511

output:

5 3 2 8 1 1035 2 12 1 1031 2 16 1 1027 2 20 1 1023 2 24 1 1019 2 28 1 1015 2 32 1 1011 2 36 1 1007 2 40 1 1003 2 44 1 999 2 48 1 995 2 52 1 991 2 56 1 987 2 60 1 983 2 64 1 979 2 68 1 975 2 72 1 971 2 76 1 967 2 80 1 963 2 84 1 959 2 88 1 955 2 92 1 951 2 96 1 947 2 100 1 943 2 104 1 939 2 108 1 935...

result:

ok correct

Test #26:

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

input:

1170 575

output:

5 3 2 8 1 1163 2 12 1 1159 2 16 1 1155 2 20 1 1151 2 24 1 1147 2 28 1 1143 2 32 1 1139 2 36 1 1135 2 40 1 1131 2 44 1 1127 2 48 1 1123 2 52 1 1119 2 56 1 1115 2 60 1 1111 2 64 1 1107 2 68 1 1103 2 72 1 1099 2 76 1 1095 2 80 1 1091 2 84 1 1087 2 88 1 1083 2 92 1 1079 2 96 1 1075 2 100 1 1071 2 104 1 ...

result:

ok correct

Test #27:

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

input:

1249 615

output:

5 3 2 8 1 1242 2 12 1 1238 2 16 1 1234 2 20 1 1230 2 24 1 1226 2 28 1 1222 2 32 1 1218 2 36 1 1214 2 40 1 1210 2 44 1 1206 2 48 1 1202 2 52 1 1198 2 56 1 1194 2 60 1 1190 2 64 1 1186 2 68 1 1182 2 72 1 1178 2 76 1 1174 2 80 1 1170 2 84 1 1166 2 88 1 1162 2 92 1 1158 2 96 1 1154 2 100 1 1150 2 104 1 ...

result:

ok correct

Test #28:

score: 0
Accepted
time: 16ms
memory: 4080kb

input:

746 364

output:

6 7 4 2 8 1 739 2 12 1 735 2 16 1 731 2 20 1 727 2 24 1 723 2 28 1 719 2 32 1 715 2 36 1 711 2 40 1 707 2 44 1 703 2 48 1 699 2 52 1 695 2 56 1 691 2 60 1 687 2 64 1 683 2 68 1 679 2 72 1 675 2 76 1 671 2 80 1 667 2 84 1 663 2 88 1 659 2 92 1 655 2 96 1 651 2 100 1 647 2 104 1 643 2 108 1 639 2 112 ...

result:

ok correct

Test #29:

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

input:

1146 565

output:

2 8 1 1139 2 12 1 1135 2 16 1 1131 2 20 1 1127 2 24 1 1123 2 28 1 1119 2 32 1 1115 2 36 1 1111 2 40 1 1107 2 44 1 1103 2 48 1 1099 2 52 1 1095 2 56 1 1091 2 60 1 1087 2 64 1 1083 2 68 1 1079 2 72 1 1075 2 76 1 1071 2 80 1 1067 2 84 1 1063 2 88 1 1059 2 92 1 1055 2 96 1 1051 2 100 1 1047 2 104 1 1043...

result:

ok correct

Test #30:

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

input:

554 265

output:

2 8 1 547 2 12 1 543 2 16 1 539 2 20 1 535 2 24 1 531 2 28 1 527 2 32 1 523 2 36 1 519 2 40 1 515 2 44 1 511 2 48 1 507 2 52 1 503 2 56 1 499 2 60 1 495 2 64 1 491 2 68 1 487 2 72 1 483 2 76 1 479 2 80 1 475 2 84 1 471 2 88 1 467 2 92 1 463 2 96 1 459 2 100 1 455 2 104 1 451 2 108 1 447 2 112 1 443 ...

result:

ok correct

Test #31:

score: 0
Accepted
time: 25ms
memory: 3848kb

input:

1061 519

output:

5 3 2 8 1 1054 2 12 1 1050 2 16 1 1046 2 20 1 1042 2 24 1 1038 2 28 1 1034 2 32 1 1030 2 36 1 1026 2 40 1 1022 2 44 1 1018 2 48 1 1014 2 52 1 1010 2 56 1 1006 2 60 1 1002 2 64 1 998 2 68 1 994 2 72 1 990 2 76 1 986 2 80 1 982 2 84 1 978 2 88 1 974 2 92 1 970 2 96 1 966 2 100 1 962 2 104 1 958 2 108 ...

result:

ok correct

Test #32:

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

input:

173 78

output:

3 2 8 1 166 2 12 1 162 2 16 1 158 2 20 1 154 2 24 1 150 2 28 1 146 2 32 1 142 2 36 1 138 2 40 1 134 2 44 1 130 2 48 1 126 2 52 1 122 2 56 1 118 2 60 1 114 2 64 1 110 2 68 1 106 2 72 1 102 2 76 1 98 2 80 1 94 2 4 3 9 2 167 3 13 2 163 3 17 2 159 3 21 2 155 3 25 2 151 3 29 2 147 3 33 2 143 3 37 2 139 3...

result:

ok correct

Test #33:

score: 0
Accepted
time: 22ms
memory: 3800kb

input:

884 430

output:

3 2 8 1 877 2 12 1 873 2 16 1 869 2 20 1 865 2 24 1 861 2 28 1 857 2 32 1 853 2 36 1 849 2 40 1 845 2 44 1 841 2 48 1 837 2 52 1 833 2 56 1 829 2 60 1 825 2 64 1 821 2 68 1 817 2 72 1 813 2 76 1 809 2 80 1 805 2 84 1 801 2 88 1 797 2 92 1 793 2 96 1 789 2 100 1 785 2 104 1 781 2 108 1 777 2 112 1 77...

result:

ok correct

Test #34:

score: 0
Accepted
time: 34ms
memory: 3784kb

input:

1089 537

output:

2 8 1 1082 2 12 1 1078 2 16 1 1074 2 20 1 1070 2 24 1 1066 2 28 1 1062 2 32 1 1058 2 36 1 1054 2 40 1 1050 2 44 1 1046 2 48 1 1042 2 52 1 1038 2 56 1 1034 2 60 1 1030 2 64 1 1026 2 68 1 1022 2 72 1 1018 2 76 1 1014 2 80 1 1010 2 84 1 1006 2 88 1 1002 2 92 1 998 2 96 1 994 2 100 1 990 2 104 1 986 2 1...

result:

ok correct

Test #35:

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

input:

433 207

output:

5 3 2 8 1 426 2 12 1 422 2 16 1 418 2 20 1 414 2 24 1 410 2 28 1 406 2 32 1 402 2 36 1 398 2 40 1 394 2 44 1 390 2 48 1 386 2 52 1 382 2 56 1 378 2 60 1 374 2 64 1 370 2 68 1 366 2 72 1 362 2 76 1 358 2 80 1 354 2 84 1 350 2 88 1 346 2 92 1 342 2 96 1 338 2 100 1 334 2 104 1 330 2 108 1 326 2 112 1 ...

result:

ok correct