QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#484861#8651. Table TennisQwerty12329 766ms6652kbC++232.0kb2024-07-20 03:17:092024-07-20 03:17:09

Judging History

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

  • [2024-07-20 03:17:09]
  • 评测
  • 测评结果:9
  • 用时:766ms
  • 内存:6652kb
  • [2024-07-20 03:17:09]
  • 提交

answer

#include <iostream>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#include <bits/stdc++.h>

int count(int n, const std::vector<std::vector<bool>> &data) {
    int cnt = 0;
    for (int i = 0; i < n; i++) {
        for (int j = i + 1; j < n; j++) {
            for (int k = j + 1; k < n; k++) {
                if (data[i][j] == data[j][k] && data[j][k] == data[k][i]) {
                    cnt++;
                }
            }
        }
    }
    return cnt;
}

std::mt19937 rnd;

void solve() {
    int n, m;
    std::cin >> n >> m;
    std::vector<std::vector<bool>> ans(n, std::vector<bool>(n));
    if (m <= n - 2) {
        for (int i = 0; i < n; i++) {
            for (int j = i + 1; j < n; j++) {
                ans[i][j] = (i == 0 && j == m + 1);
                ans[j][i] = !ans[i][j];
            }
        }
        std::cout << "Yes\n";
        for (int i = 1; i < n; i++) {
            for (int j = 0; j < i; j++) {
                std::cout << ans[i][j];
            }
            std::cout << std::endl;
        }
        return;
    }
    // assert(n <= 7);
    int cnt = n * (n - 1) / 2;
    for (int t = 0; t < 0.5e9 / pow(n, 3); t++) {
        int x = t;
        for (int i = 0; i < n; i++) {
            for (int j = i + 1; j < n; j++) {
                int b = x & 1;
                x >>= 1;
                b = rnd() % 2;

                ans[i][j] = b;
                ans[j][i] = !b;
            }
        }
        int ct = count(n, ans);
        if (ct == m) {
            std::cout << "Yes\n";
            for (int i = 1; i < n; i++) {
                for (int j = 0; j < i; j++) {
                    std::cout << ans[i][j];
                }
                std::cout << std::endl;
            }
            return;
        }
    }
    std::cout << "No\n";
}

int32_t main() {
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(nullptr);

    int t;
    std::cin >> t;
    while (t--) {
        solve();
    }

    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 7ms
memory: 3664kb

input:

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

output:

Yes
0
11
Yes
0
11
111
Yes
0
11
111
1111
Yes
0
11
111
1111
11111
Yes
0
11
111
1111
11111
111111
Yes
0
11
111
1111
11111
111111
1111111
Yes
0
11
111
1111
11111
111111
1111111
11111111
Yes
0
11
111
1111
11111
111111
1111111
11111111
111111111
Yes
0
11
111
1111
11111
111111
1111111
11111111
111111111
11...

result:

ok good job! (97 test cases)

Test #2:

score: 0
Accepted
time: 311ms
memory: 6200kb

input:

5
4839 0
127 0
22 0
7 0
5 0

output:

Yes
0
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (5 test cases)

Test #3:

score: 0
Accepted
time: 76ms
memory: 3984kb

input:

11
1191 0
1580 0
199 0
484 0
209 0
1226 0
92 0
5 0
4 0
4 0
6 0

output:

Yes
0
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (11 test cases)

Test #4:

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

input:

8
953 0
1747 0
1782 0
213 0
210 0
82 0
10 0
3 0

output:

Yes
0
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (8 test cases)

Test #5:

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

input:

1
6 0

output:

Yes
0
11
111
1111
11111

result:

ok good job! (1 test case)

Test #6:

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

input:

1
7 0

output:

Yes
0
11
111
1111
11111
111111

result:

ok good job! (1 test case)

Test #7:

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

input:

1
19 0

output:

Yes
0
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111

result:

ok good job! (1 test case)

Test #8:

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

input:

1
20 0

output:

Yes
0
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111

result:

ok good job! (1 test case)

Test #9:

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

input:

1
149 0

output:

Yes
0
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #10:

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

input:

1
150 0

output:

Yes
0
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #11:

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

input:

1
599 0

output:

Yes
0
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #12:

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

input:

1
600 0

output:

Yes
0
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #13:

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

input:

1
4999 0

output:

Yes
0
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #14:

score: 0
Accepted
time: 332ms
memory: 6480kb

input:

1
5000 0

output:

Yes
0
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #15:

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

input:

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

output:

Yes
0
11
Yes
1
01
Yes
0
11
111
Yes
1
01
111
Yes
1
11
011
Yes
0
11
111
1111
Yes
1
01
111
1111
Yes
1
11
011
1111
Yes
1
11
111
0111
Yes
0
11
111
1111
11111
Yes
1
01
111
1111
11111
Yes
1
11
011
1111
11111
Yes
1
11
111
0111
11111
Yes
1
11
111
1111
01111
Yes
0
11
111
1111
11111
111111
Yes
1
01
111
1111
11...

result:

ok good job! (291 test cases)

Test #16:

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

input:

11
123 75
1445 897
1645 84
577 115
634 455
118 80
411 132
18 8
23 8
3 1
3 1

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (11 test cases)

Test #17:

score: 0
Accepted
time: 126ms
memory: 4028kb

input:

7
1948 1328
2367 1910
216 211
374 276
36 32
20 8
39 6

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (7 test cases)

Test #18:

score: 0
Accepted
time: 150ms
memory: 4364kb

input:

6
3051 778
750 222
966 939
138 126
90 28
4 0

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (6 test cases)

Test #19:

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

input:

1
6 0

output:

Yes
0
11
111
1111
11111

result:

ok good job! (1 test case)

Test #20:

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

input:

1
7 2

output:

Yes
1
11
011
1111
11111
111111

result:

ok good job! (1 test case)

Test #21:

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

input:

1
19 7

output:

Yes
1
11
111
1111
11111
111111
1111111
01111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111

result:

ok good job! (1 test case)

Test #22:

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

input:

1
20 14

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
011111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111

result:

ok good job! (1 test case)

Test #23:

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

input:

1
149 6

output:

Yes
1
11
111
1111
11111
111111
0111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #24:

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

input:

1
150 44

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #25:

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

input:

1
599 503

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #26:

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

input:

1
600 218

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #27:

score: 0
Accepted
time: 316ms
memory: 6620kb

input:

1
4999 4407

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #28:

score: 0
Accepted
time: 339ms
memory: 6484kb

input:

1
4999 1436

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #29:

score: 0
Accepted
time: 338ms
memory: 6560kb

input:

1
5000 107

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #30:

score: 0
Accepted
time: 335ms
memory: 6476kb

input:

1
5000 1509

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #31:

score: 0
Accepted
time: 331ms
memory: 6536kb

input:

1
5000 2242

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #32:

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

input:

1
4 2

output:

Yes
1
11
011

result:

ok good job! (1 test case)

Test #33:

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

input:

1
5 3

output:

Yes
1
11
111
0111

result:

ok good job! (1 test case)

Test #34:

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

input:

1
6 4

output:

Yes
1
11
111
1111
01111

result:

ok good job! (1 test case)

Test #35:

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

input:

1
7 5

output:

Yes
1
11
111
1111
11111
011111

result:

ok good job! (1 test case)

Test #36:

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

input:

1
19 17

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
011111111111111111

result:

ok good job! (1 test case)

Test #37:

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

input:

1
20 18

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
0111111111111111111

result:

ok good job! (1 test case)

Test #38:

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

input:

1
149 147

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #39:

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

input:

1
150 148

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #40:

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

input:

1
599 597

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #41:

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

input:

1
600 598

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #42:

score: 0
Accepted
time: 333ms
memory: 6560kb

input:

1
4999 4997

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #43:

score: 0
Accepted
time: 332ms
memory: 6648kb

input:

1
5000 4998

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #44:

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

input:

1
4 0

output:

Yes
0
11
111

result:

ok good job! (1 test case)

Test #45:

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

input:

1
5 1

output:

Yes
1
01
111
1111

result:

ok good job! (1 test case)

Test #46:

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

input:

1
6 1

output:

Yes
1
01
111
1111
11111

result:

ok good job! (1 test case)

Test #47:

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

input:

1
7 1

output:

Yes
1
01
111
1111
11111
111111

result:

ok good job! (1 test case)

Test #48:

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

input:

1
19 12

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
0111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111

result:

ok good job! (1 test case)

Test #49:

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

input:

1
20 13

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
01111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111

result:

ok good job! (1 test case)

Test #50:

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

input:

1
149 146

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #51:

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

input:

1
150 145

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #52:

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

input:

1
599 595

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #53:

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

input:

1
600 597

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #54:

score: 0
Accepted
time: 327ms
memory: 6648kb

input:

1
4999 4992

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #55:

score: 0
Accepted
time: 336ms
memory: 6488kb

input:

1
4999 4994

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #56:

score: 0
Accepted
time: 328ms
memory: 6488kb

input:

1
5000 4994

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Test #57:

score: 0
Accepted
time: 327ms
memory: 6636kb

input:

1
5000 4994

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111
11111111111111111111
111111111111111111111
1111111111111111111111
111111111111111111111...

result:

ok good job! (1 test case)

Subtask #2:

score: 4
Accepted

Test #58:

score: 4
Accepted
time: 662ms
memory: 4044kb

input:

1
4 4

output:

No

result:

ok good job! (1 test case)

Test #59:

score: 0
Accepted
time: 709ms
memory: 3840kb

input:

1
5 10

output:

No

result:

ok good job! (1 test case)

Test #60:

score: 0
Accepted
time: 747ms
memory: 3904kb

input:

1
6 20

output:

No

result:

ok good job! (1 test case)

Test #61:

score: 0
Accepted
time: 760ms
memory: 3904kb

input:

1
7 35

output:

No

result:

ok good job! (1 test case)

Test #62:

score: 0
Accepted
time: 702ms
memory: 4100kb

input:

1
5 10

output:

No

result:

ok good job! (1 test case)

Test #63:

score: 0
Accepted
time: 745ms
memory: 4108kb

input:

1
6 19

output:

No

result:

ok good job! (1 test case)

Test #64:

score: 0
Accepted
time: 744ms
memory: 3940kb

input:

1
6 20

output:

No

result:

ok good job! (1 test case)

Test #65:

score: 0
Accepted
time: 765ms
memory: 3812kb

input:

1
7 33

output:

No

result:

ok good job! (1 test case)

Test #66:

score: 0
Accepted
time: 766ms
memory: 3908kb

input:

1
7 33

output:

No

result:

ok good job! (1 test case)

Test #67:

score: 0
Accepted
time: 661ms
memory: 3836kb

input:

1
4 3

output:

No

result:

ok good job! (1 test case)

Test #68:

score: 0
Accepted
time: 708ms
memory: 3816kb

input:

1
5 8

output:

No

result:

ok good job! (1 test case)

Test #69:

score: 0
Accepted
time: 749ms
memory: 3900kb

input:

1
6 17

output:

No

result:

ok good job! (1 test case)

Test #70:

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

input:

1
7 30

output:

No

result:

ok good job! (1 test case)

Test #71:

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

input:

2
3 0
3 1

output:

Yes
0
11
Yes
1
01

result:

ok good job! (2 test cases)

Test #72:

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

input:

2
3 0
3 1

output:

Yes
0
11
Yes
1
01

result:

ok good job! (2 test cases)

Test #73:

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

input:

1
4 2

output:

Yes
1
11
011

result:

ok good job! (1 test case)

Test #74:

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

input:

1
5 5

output:

Yes
1
00
010
1100

result:

ok good job! (1 test case)

Test #75:

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

input:

1
6 8

output:

Yes
1
00
011
0101
11000

result:

ok good job! (1 test case)

Test #76:

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

input:

1
7 14

output:

Yes
1
01
000
1010
01001
111000

result:

ok good job! (1 test case)

Test #77:

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

input:

1
6 5

output:

Yes
0
10
011
1110
01110

result:

ok good job! (1 test case)

Test #78:

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

input:

1
6 4

output:

Yes
1
11
111
1111
01111

result:

ok good job! (1 test case)

Test #79:

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

input:

1
7 7

output:

Yes
0
10
011
1110
00110
111101

result:

ok good job! (1 test case)

Test #80:

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

input:

1
7 6

output:

Yes
1
01
010
0000
10011
000100

result:

ok good job! (1 test case)

Test #81:

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

input:

1
7 8

output:

Yes
1
00
111
0111
10001
001001

result:

ok good job! (1 test case)

Test #82:

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

input:

1
6 7

output:

Yes
1
01
100
1110
01010

result:

ok good job! (1 test case)

Test #83:

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

input:

1
6 6

output:

Yes
0
01
110
1100
10100

result:

ok good job! (1 test case)

Test #84:

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

input:

1
7 11

output:

Yes
1
00
010
1111
11001
011110

result:

ok good job! (1 test case)

Test #85:

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

input:

1
7 11

output:

Yes
1
00
010
1111
11001
011110

result:

ok good job! (1 test case)

Test #86:

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

input:

1
7 13

output:

Yes
0
01
100
1010
00011
101000

result:

ok good job! (1 test case)

Test #87:

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

input:

1
6 6

output:

Yes
0
01
110
1100
10100

result:

ok good job! (1 test case)

Test #88:

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

input:

1
7 9

output:

Yes
1
10
001
0100
10101
111010

result:

ok good job! (1 test case)

Test #89:

score: 0
Accepted
time: 661ms
memory: 3872kb

input:

1
4 3

output:

No

result:

ok good job! (1 test case)

Test #90:

score: 0
Accepted
time: 713ms
memory: 4120kb

input:

1
5 10

output:

No

result:

ok good job! (1 test case)

Test #91:

score: 0
Accepted
time: 747ms
memory: 3888kb

input:

1
6 13

output:

No

result:

ok good job! (1 test case)

Test #92:

score: 0
Accepted
time: 765ms
memory: 3840kb

input:

1
7 23

output:

No

result:

ok good job! (1 test case)

Test #93:

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

input:

1
6 5

output:

Yes
0
10
011
1110
01110

result:

ok good job! (1 test case)

Test #94:

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

input:

1
6 2

output:

Yes
1
11
011
1111
11111

result:

ok good job! (1 test case)

Test #95:

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

input:

1
7 7

output:

Yes
0
10
011
1110
00110
111101

result:

ok good job! (1 test case)

Test #96:

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

input:

1
7 6

output:

Yes
1
01
010
0000
10011
000100

result:

ok good job! (1 test case)

Test #97:

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

input:

1
7 8

output:

Yes
1
00
111
0111
10001
001001

result:

ok good job! (1 test case)

Test #98:

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

input:

1
6 5

output:

Yes
0
10
011
1110
01110

result:

ok good job! (1 test case)

Test #99:

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

input:

1
6 4

output:

Yes
1
11
111
1111
01111

result:

ok good job! (1 test case)

Test #100:

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

input:

1
7 7

output:

Yes
0
10
011
1110
00110
111101

result:

ok good job! (1 test case)

Test #101:

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

input:

1
7 6

output:

Yes
1
01
010
0000
10011
000100

result:

ok good job! (1 test case)

Test #102:

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

input:

1
7 8

output:

Yes
1
00
111
0111
10001
001001

result:

ok good job! (1 test case)

Test #103:

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

input:

1
6 1

output:

Yes
1
01
111
1111
11111

result:

ok good job! (1 test case)

Test #104:

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

input:

1
6 1

output:

Yes
1
01
111
1111
11111

result:

ok good job! (1 test case)

Test #105:

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

input:

1
7 3

output:

Yes
1
11
111
0111
11111
111111

result:

ok good job! (1 test case)

Test #106:

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

input:

1
7 3

output:

Yes
1
11
111
0111
11111
111111

result:

ok good job! (1 test case)

Test #107:

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

input:

1
7 3

output:

Yes
1
11
111
0111
11111
111111

result:

ok good job! (1 test case)

Test #108:

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

input:

1
5 2

output:

Yes
1
11
011
1111

result:

ok good job! (1 test case)

Test #109:

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

input:

1
6 5

output:

Yes
0
10
011
1110
01110

result:

ok good job! (1 test case)

Test #110:

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

input:

2
4 1
3 0

output:

Yes
1
01
111
Yes
0
11

result:

ok good job! (2 test cases)

Test #111:

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

input:

1
6 1

output:

Yes
1
01
111
1111
11111

result:

ok good job! (1 test case)

Test #112:

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

input:

2
3 0
3 1

output:

Yes
0
11
Yes
1
01

result:

ok good job! (2 test cases)

Test #113:

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

input:

1
6 1

output:

Yes
1
01
111
1111
11111

result:

ok good job! (1 test case)

Test #114:

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

input:

1
6 4

output:

Yes
1
11
111
1111
01111

result:

ok good job! (1 test case)

Test #115:

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

input:

1
7 14

output:

Yes
1
01
000
1010
01001
111000

result:

ok good job! (1 test case)

Test #116:

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

input:

1
7 8

output:

Yes
1
00
111
0111
10001
001001

result:

ok good job! (1 test case)

Test #117:

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

input:

1
7 10

output:

Yes
1
10
100
0111
10100
000110

result:

ok good job! (1 test case)

Subtask #3:

score: 0
Wrong Answer

Dependency #2:

100%
Accepted

Test #118:

score: 23
Accepted
time: 591ms
memory: 4032kb

input:

1
19 969

output:

No

result:

ok good job! (1 test case)

Test #119:

score: 0
Accepted
time: 581ms
memory: 4028kb

input:

1
20 1140

output:

No

result:

ok good job! (1 test case)

Test #120:

score: 0
Accepted
time: 597ms
memory: 3816kb

input:

1
19 968

output:

No

result:

ok good job! (1 test case)

Test #121:

score: 0
Accepted
time: 595ms
memory: 3812kb

input:

1
19 969

output:

No

result:

ok good job! (1 test case)

Test #122:

score: 0
Accepted
time: 582ms
memory: 3960kb

input:

1
20 1138

output:

No

result:

ok good job! (1 test case)

Test #123:

score: 0
Accepted
time: 579ms
memory: 4032kb

input:

1
20 1138

output:

No

result:

ok good job! (1 test case)

Test #124:

score: 0
Accepted
time: 582ms
memory: 4040kb

input:

1
20 1140

output:

No

result:

ok good job! (1 test case)

Test #125:

score: 0
Accepted
time: 596ms
memory: 3840kb

input:

1
19 846

output:

No

result:

ok good job! (1 test case)

Test #126:

score: 0
Accepted
time: 581ms
memory: 3952kb

input:

1
20 1003

output:

No

result:

ok good job! (1 test case)

Test #127:

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

input:

5
3 0
3 1
4 0
4 1
4 2

output:

Yes
0
11
Yes
1
01
Yes
0
11
111
Yes
1
01
111
Yes
1
11
011

result:

ok good job! (5 test cases)

Test #128:

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

input:

5
3 0
3 1
4 0
4 1
4 2

output:

Yes
0
11
Yes
1
01
Yes
0
11
111
Yes
1
01
111
Yes
1
11
011

result:

ok good job! (5 test cases)

Test #129:

score: -23
Wrong Answer
time: 593ms
memory: 4040kb

input:

1
19 285

output:

No

result:

wrong answer you did't find a solution but jury did (test case 1)

Subtask #4:

score: 0
Skipped

Dependency #3:

0%

Subtask #5:

score: 0
Skipped

Dependency #4:

0%

Subtask #6:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

0%