QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#535611#8651. Table Tennislfyszy27 95ms154504kbC++142.4kb2024-08-28 11:04:242024-08-28 11:04:24

Judging History

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

  • [2024-08-28 11:04:24]
  • 评测
  • 测评结果:27
  • 用时:95ms
  • 内存:154504kb
  • [2024-08-28 11:04:24]
  • 提交

answer

// problem: 
// date: 
#include <bits/stdc++.h>
#define int long long
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define SP << " " <<
#define fish signed
using namespace std;
const int INF = 0x3f3f3f3f3f3f3f3f;
const int N = 25;
int du[N], dp[N][N * (N - 1) / 2][N * (N - 1) * (N - 2) / 6], res[N][N];
struct node {int a, b, c;} note[N][N * (N - 1) / 2][N * (N - 1) * (N - 2) / 6];
void solve()
{
    memset(dp, 0x3f, sizeof dp);
    int n, m; cin >> n >> m;
    for(int i = 0; i <= n; i ++)
	 	for(int j = 0; j <= n * (n - 1) / 2; j ++)
				for(int k = 0; k <= n * (n - 1) * (n - 2) / 6 - m; k ++)
                    dp[i][j][k] = INF;
    dp[0][0][0] = 0;
    for(int i = 1; i <= n; i ++)
	 	for(int j = i * (i - 1) / 2; j <= n * (n - 1) / 2; j ++)
				for(int k = 0; k <= n * (n - 1) * (n - 2) / 6; k ++)
						for(int d = 0; d <= min(j, n) && d * (d - 1) / 2 <= k; d ++)
								if(dp[i - 1][j - d][k - d * (d - 1) / 2] <= d) dp[i][j][k] = d, note[i][j][k] = {i - 1, j - d, k - d * (d - 1) / 2};
    node now = {0, 0, 0};
    if(dp[n][n * (n - 1) / 2][n * (n - 1) * (n - 2) / 6 - m] != INF) now = {n, n * (n - 1) / 2, n * (n - 1) * (n - 2) / 6 - m};
    if(now.a == 0 && now.b == 0 && now.c == 0) {cout << "No\n"; return ;}
    for(int i = n; i >= 1; i --)
    {
        du[i] = dp[now.a][now.b][now.c];
        now = note[now.a][now.b][now.c];
    }
    for(int i = 2; i <= n; i ++)    
        for(int j = 1; j <= n; j ++)
            res[i][j] = 0;
    vector<pair<int, int>> all;
    for(int i = 1; i <= n; i ++) all.push_back({du[i], i});
    for(int i = 0; i + 1 < n; i ++)
    {
        sort(all.begin(), all.end());
        int c = n - i - all[0].first - 1;
        for(int j = 1; j <= c; j ++)
        {
            all[n - i - j].first --;
            res[all[n - i - j].second][all[0].second] = 1;
        }
        for(int j = 1; j < n - i - c; j ++) res[all[0].second][all[j].second] = 1;
        reverse(all.begin(), all.end());
        all.pop_back();
        reverse(all.begin(), all.end());
    }
    cout << "Yes\n";
    for(int i = 2; i <= n; i ++)    
        for(int j = 1; j < i; j ++)  
            cout << res[i][j] << (j == i - 1 ? "\n" : "\0");
}
fish main()
{
    // freopen(".in", "r", stdin);
    // freopen(".out", "w", stdout);
    // ios::sync_with_stdio(0);
    // cin.tie(0); cout.tie(0);
    int t; cin >> t;
    while(t --) solve();
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Time Limit Exceeded

Test #1:

score: 0
Time Limit Exceeded

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
1
11
Yes
1
11
111
Yes
1
11
111
1111
Yes
1
11
111
1111
11111
Yes
1
11
111
1111
11111
111111
Yes
1
11
111
1111
11111
111111
1111111
Yes
1
11
111
1111
11111
111111
1111111
11111111
Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
11...

result:


Subtask #2:

score: 4
Accepted

Test #58:

score: 4
Accepted
time: 8ms
memory: 138828kb

input:

1
4 4

output:

No

result:

ok good job! (1 test case)

Test #59:

score: 4
Accepted
time: 7ms
memory: 139124kb

input:

1
5 10

output:

No

result:

ok good job! (1 test case)

Test #60:

score: 4
Accepted
time: 3ms
memory: 139684kb

input:

1
6 20

output:

No

result:

ok good job! (1 test case)

Test #61:

score: 4
Accepted
time: 3ms
memory: 138832kb

input:

1
7 35

output:

No

result:

ok good job! (1 test case)

Test #62:

score: 4
Accepted
time: 3ms
memory: 139152kb

input:

1
5 10

output:

No

result:

ok good job! (1 test case)

Test #63:

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

input:

1
6 19

output:

No

result:

ok good job! (1 test case)

Test #64:

score: 4
Accepted
time: 4ms
memory: 140040kb

input:

1
6 20

output:

No

result:

ok good job! (1 test case)

Test #65:

score: 4
Accepted
time: 8ms
memory: 139436kb

input:

1
7 33

output:

No

result:

ok good job! (1 test case)

Test #66:

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

input:

1
7 33

output:

No

result:

ok good job! (1 test case)

Test #67:

score: 4
Accepted
time: 4ms
memory: 140628kb

input:

1
4 3

output:

No

result:

ok good job! (1 test case)

Test #68:

score: 4
Accepted
time: 3ms
memory: 138536kb

input:

1
5 8

output:

No

result:

ok good job! (1 test case)

Test #69:

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

input:

1
6 17

output:

No

result:

ok good job! (1 test case)

Test #70:

score: 4
Accepted
time: 8ms
memory: 139140kb

input:

1
7 30

output:

No

result:

ok good job! (1 test case)

Test #71:

score: 4
Accepted
time: 15ms
memory: 140072kb

input:

2
3 0
3 1

output:

Yes
1
11
Yes
0
10

result:

ok good job! (2 test cases)

Test #72:

score: 4
Accepted
time: 12ms
memory: 139808kb

input:

2
3 0
3 1

output:

Yes
1
11
Yes
0
10

result:

ok good job! (2 test cases)

Test #73:

score: 4
Accepted
time: 3ms
memory: 139984kb

input:

1
4 2

output:

Yes
0
10
110

result:

ok good job! (1 test case)

Test #74:

score: 4
Accepted
time: 4ms
memory: 139532kb

input:

1
5 5

output:

Yes
0
00
100
1100

result:

ok good job! (1 test case)

Test #75:

score: 4
Accepted
time: 7ms
memory: 139096kb

input:

1
6 8

output:

Yes
0
00
100
1100
11100

result:

ok good job! (1 test case)

Test #76:

score: 4
Accepted
time: 7ms
memory: 138908kb

input:

1
7 14

output:

Yes
0
00
000
1000
11000
111000

result:

ok good job! (1 test case)

Test #77:

score: 4
Accepted
time: 7ms
memory: 139692kb

input:

1
6 5

output:

Yes
0
00
100
1100
11111

result:

ok good job! (1 test case)

Test #78:

score: 4
Accepted
time: 3ms
memory: 139756kb

input:

1
6 4

output:

Yes
0
10
100
1110
11111

result:

ok good job! (1 test case)

Test #79:

score: 4
Accepted
time: 8ms
memory: 140372kb

input:

1
7 7

output:

Yes
0
00
110
1001
11110
111111

result:

ok good job! (1 test case)

Test #80:

score: 4
Accepted
time: 4ms
memory: 139756kb

input:

1
7 6

output:

Yes
0
11
101
1010
11110
111111

result:

ok good job! (1 test case)

Test #81:

score: 4
Accepted
time: 11ms
memory: 140032kb

input:

1
7 8

output:

Yes
0
00
100
1100
11100
111111

result:

ok good job! (1 test case)

Test #82:

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

input:

1
6 7

output:

Yes
0
00
110
1001
11110

result:

ok good job! (1 test case)

Test #83:

score: 4
Accepted
time: 8ms
memory: 140324kb

input:

1
6 6

output:

Yes
0
11
101
1010
11110

result:

ok good job! (1 test case)

Test #84:

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

input:

1
7 11

output:

Yes
0
01
100
1000
11100
111101

result:

ok good job! (1 test case)

Test #85:

score: 4
Accepted
time: 4ms
memory: 139224kb

input:

1
7 11

output:

Yes
0
01
100
1000
11100
111101

result:

ok good job! (1 test case)

Test #86:

score: 4
Accepted
time: 7ms
memory: 139032kb

input:

1
7 13

output:

Yes
0
00
100
1000
11000
111100

result:

ok good job! (1 test case)

Test #87:

score: 4
Accepted
time: 3ms
memory: 139268kb

input:

1
6 6

output:

Yes
0
11
101
1010
11110

result:

ok good job! (1 test case)

Test #88:

score: 4
Accepted
time: 7ms
memory: 139936kb

input:

1
7 9

output:

Yes
0
01
110
1011
10110
111110

result:

ok good job! (1 test case)

Test #89:

score: 4
Accepted
time: 7ms
memory: 139692kb

input:

1
4 3

output:

No

result:

ok good job! (1 test case)

Test #90:

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

input:

1
5 10

output:

No

result:

ok good job! (1 test case)

Test #91:

score: 4
Accepted
time: 7ms
memory: 139720kb

input:

1
6 13

output:

No

result:

ok good job! (1 test case)

Test #92:

score: 4
Accepted
time: 3ms
memory: 139696kb

input:

1
7 23

output:

No

result:

ok good job! (1 test case)

Test #93:

score: 4
Accepted
time: 12ms
memory: 139452kb

input:

1
6 5

output:

Yes
0
00
100
1100
11111

result:

ok good job! (1 test case)

Test #94:

score: 4
Accepted
time: 11ms
memory: 138624kb

input:

1
6 2

output:

Yes
0
10
110
1111
11111

result:

ok good job! (1 test case)

Test #95:

score: 4
Accepted
time: 3ms
memory: 140352kb

input:

1
7 7

output:

Yes
0
00
110
1001
11110
111111

result:

ok good job! (1 test case)

Test #96:

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

input:

1
7 6

output:

Yes
0
11
101
1010
11110
111111

result:

ok good job! (1 test case)

Test #97:

score: 4
Accepted
time: 4ms
memory: 139508kb

input:

1
7 8

output:

Yes
0
00
100
1100
11100
111111

result:

ok good job! (1 test case)

Test #98:

score: 4
Accepted
time: 21ms
memory: 138832kb

input:

1
6 5

output:

Yes
0
00
100
1100
11111

result:

ok good job! (1 test case)

Test #99:

score: 4
Accepted
time: 7ms
memory: 139128kb

input:

1
6 4

output:

Yes
0
10
100
1110
11111

result:

ok good job! (1 test case)

Test #100:

score: 4
Accepted
time: 11ms
memory: 139504kb

input:

1
7 7

output:

Yes
0
00
110
1001
11110
111111

result:

ok good job! (1 test case)

Test #101:

score: 4
Accepted
time: 11ms
memory: 140712kb

input:

1
7 6

output:

Yes
0
11
101
1010
11110
111111

result:

ok good job! (1 test case)

Test #102:

score: 4
Accepted
time: 3ms
memory: 139280kb

input:

1
7 8

output:

Yes
0
00
100
1100
11100
111111

result:

ok good job! (1 test case)

Test #103:

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

input:

1
6 1

output:

Yes
0
10
111
1111
11111

result:

ok good job! (1 test case)

Test #104:

score: 4
Accepted
time: 7ms
memory: 139596kb

input:

1
6 1

output:

Yes
0
10
111
1111
11111

result:

ok good job! (1 test case)

Test #105:

score: 4
Accepted
time: 11ms
memory: 139140kb

input:

1
7 3

output:

Yes
0
10
110
1110
11111
111111

result:

ok good job! (1 test case)

Test #106:

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

input:

1
7 3

output:

Yes
0
10
110
1110
11111
111111

result:

ok good job! (1 test case)

Test #107:

score: 4
Accepted
time: 7ms
memory: 139504kb

input:

1
7 3

output:

Yes
0
10
110
1110
11111
111111

result:

ok good job! (1 test case)

Test #108:

score: 4
Accepted
time: 4ms
memory: 139684kb

input:

1
5 2

output:

Yes
0
10
110
1111

result:

ok good job! (1 test case)

Test #109:

score: 4
Accepted
time: 3ms
memory: 139956kb

input:

1
6 5

output:

Yes
0
00
100
1100
11111

result:

ok good job! (1 test case)

Test #110:

score: 4
Accepted
time: 11ms
memory: 140308kb

input:

2
4 1
3 0

output:

Yes
0
10
111
Yes
1
11

result:

ok good job! (2 test cases)

Test #111:

score: 4
Accepted
time: 4ms
memory: 140076kb

input:

1
6 1

output:

Yes
0
10
111
1111
11111

result:

ok good job! (1 test case)

Test #112:

score: 4
Accepted
time: 27ms
memory: 140452kb

input:

2
3 0
3 1

output:

Yes
1
11
Yes
0
10

result:

ok good job! (2 test cases)

Test #113:

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

input:

1
6 1

output:

Yes
0
10
111
1111
11111

result:

ok good job! (1 test case)

Test #114:

score: 4
Accepted
time: 4ms
memory: 140004kb

input:

1
6 4

output:

Yes
0
10
100
1110
11111

result:

ok good job! (1 test case)

Test #115:

score: 4
Accepted
time: 11ms
memory: 140292kb

input:

1
7 14

output:

Yes
0
00
000
1000
11000
111000

result:

ok good job! (1 test case)

Test #116:

score: 4
Accepted
time: 3ms
memory: 140512kb

input:

1
7 8

output:

Yes
0
00
100
1100
11100
111111

result:

ok good job! (1 test case)

Test #117:

score: 4
Accepted
time: 12ms
memory: 140760kb

input:

1
7 10

output:

Yes
0
00
100
1110
11001
111110

result:

ok good job! (1 test case)

Subtask #3:

score: 23
Accepted

Dependency #2:

100%
Accepted

Test #118:

score: 23
Accepted
time: 52ms
memory: 150372kb

input:

1
19 969

output:

No

result:

ok good job! (1 test case)

Test #119:

score: 23
Accepted
time: 72ms
memory: 154304kb

input:

1
20 1140

output:

No

result:

ok good job! (1 test case)

Test #120:

score: 23
Accepted
time: 51ms
memory: 150896kb

input:

1
19 968

output:

No

result:

ok good job! (1 test case)

Test #121:

score: 23
Accepted
time: 61ms
memory: 150808kb

input:

1
19 969

output:

No

result:

ok good job! (1 test case)

Test #122:

score: 23
Accepted
time: 75ms
memory: 152828kb

input:

1
20 1138

output:

No

result:

ok good job! (1 test case)

Test #123:

score: 23
Accepted
time: 72ms
memory: 153060kb

input:

1
20 1138

output:

No

result:

ok good job! (1 test case)

Test #124:

score: 23
Accepted
time: 67ms
memory: 153512kb

input:

1
20 1140

output:

No

result:

ok good job! (1 test case)

Test #125:

score: 23
Accepted
time: 47ms
memory: 151524kb

input:

1
19 846

output:

No

result:

ok good job! (1 test case)

Test #126:

score: 23
Accepted
time: 80ms
memory: 153952kb

input:

1
20 1003

output:

No

result:

ok good job! (1 test case)

Test #127:

score: 23
Accepted
time: 48ms
memory: 139380kb

input:

5
3 0
3 1
4 0
4 1
4 2

output:

Yes
1
11
Yes
0
10
Yes
1
11
111
Yes
0
10
111
Yes
0
10
110

result:

ok good job! (5 test cases)

Test #128:

score: 23
Accepted
time: 56ms
memory: 140324kb

input:

5
3 0
3 1
4 0
4 1
4 2

output:

Yes
1
11
Yes
0
10
Yes
1
11
111
Yes
0
10
111
Yes
0
10
110

result:

ok good job! (5 test cases)

Test #129:

score: 23
Accepted
time: 50ms
memory: 149620kb

input:

1
19 285

output:

Yes
0
00
000
0000
00000
000000
0000000
00000000
000000000
1000000000
11000000000
111000000000
1111000000000
11111000000000
111111000000000
1111111000000000
11111111000000000
111111111000000000

result:

ok good job! (1 test case)

Test #130:

score: 23
Accepted
time: 83ms
memory: 153276kb

input:

1
20 330

output:

Yes
0
00
000
0000
00000
000000
0000000
00000000
000000000
1000000000
11000000000
111000000000
1111000000000
11111000000000
111111000000000
1111111000000000
11111111000000000
111111111000000000
1111111111000000000

result:

ok good job! (1 test case)

Test #131:

score: 23
Accepted
time: 52ms
memory: 150104kb

input:

1
19 274

output:

Yes
0
00
000
0000
01000
010000
0100000
01000000
100000000
1000000000
10100000000
101100000000
1011100000000
11111110000000
111111000000000
1111111100000000
11111111100000100
111111111100001011

result:

ok good job! (1 test case)

Test #132:

score: 23
Accepted
time: 60ms
memory: 150536kb

input:

1
19 271

output:

Yes
0
00
000
0000
00000
000000
0100000
01000000
100000000
1000000000
10100000000
111111000000
1111000000000
11111000000000
111111110000000
1111111000001000
11111111100010010
111111111100100101

result:

ok good job! (1 test case)

Test #133:

score: 23
Accepted
time: 67ms
memory: 153568kb

input:

1
20 289

output:

Yes
0
01
010
0100
01000
010000
0100000
01000000
100000000
1000000000
10110000000
101000000000
1011100000000
10111100000000
101111100000000
1011111100000000
11111111100000000
111111111101000001
1111111111110111111

result:

ok good job! (1 test case)

Test #134:

score: 23
Accepted
time: 74ms
memory: 153940kb

input:

1
20 328

output:

Yes
0
00
000
0000
00000
000000
0000000
00000000
000000000
1111111100
10000000000
110000000010
1110000000100
11110000001000
111110000010000
1111110000100000
11111110001000000
111111111010000000
1111111111100000000

result:

ok good job! (1 test case)

Test #135:

score: 23
Accepted
time: 63ms
memory: 153192kb

input:

1
20 313

output:

Yes
0
00
000
0000
00000
000000
0000000
00000000
000000000
1110000000
10000000000
110000000000
1111110000000
11110000000000
111110000000000
1111111000000000
11111111001001000
111111111010010000
1111111111100100111

result:

ok good job! (1 test case)

Test #136:

score: 23
Accepted
time: 62ms
memory: 149568kb

input:

1
19 114

output:

Yes
0
00
000
0000
00000
000000
1111000
10000000
111000000
1100000100
11111001000
111111010000
1111111101000
11111111110111
111111111111111
1111111111111111
11111111111111111
111111111111111111

result:

ok good job! (1 test case)

Test #137:

score: 23
Accepted
time: 46ms
memory: 149744kb

input:

1
19 96

output:

Yes
0
00
000
0000
00000
110000
1000000
10000000
111000000
1111000000
11111010000
111111100000
1111111101111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111

result:

ok good job! (1 test case)

Test #138:

score: 23
Accepted
time: 87ms
memory: 153380kb

input:

1
20 152

output:

Yes
0
00
000
0000
00000
000000
0000000
11000000
100000000
1111000000
11100000000
111110000000
1111110000000
11111110101000
111111111010111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111

result:

ok good job! (1 test case)

Test #139:

score: 23
Accepted
time: 73ms
memory: 154504kb

input:

1
20 250

output:

Yes
0
00
000
0000
00000
000000
0000000
00000000
111111100
1000000000
11100000010
110000000100
1111100001000
11110000010000
111111000100000
1111111101000000
11111111110101000
111111111111010111
1111111111111111111

result:

ok good job! (1 test case)

Test #140:

score: 23
Accepted
time: 75ms
memory: 153924kb

input:

1
20 28

output:

Yes
0
01
010
1000
10000
101000
1111000
11111000
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111

result:

ok good job! (1 test case)

Test #141:

score: 23
Accepted
time: 44ms
memory: 151420kb

input:

1
19 231

output:

Yes
0
00
000
0000
00000
000000
0000000
00000000
111100000
1000000000
11000000000
111000000000
1111110000000
11111000010000
111111110100000
1111111001000101
11111111110001010
111111111111111111

result:

ok good job! (1 test case)

Test #142:

score: 23
Accepted
time: 52ms
memory: 151264kb

input:

1
19 270

output:

Yes
0
00
000
0000
01000
010000
0100000
01000000
100000000
1000000000
10100000000
101100000000
1011100000000
11111100000000
111111100000000
1111111100000000
11111111100000000
111111111100001111

result:

ok good job! (1 test case)

Test #143:

score: 23
Accepted
time: 80ms
memory: 153536kb

input:

1
20 258

output:

Yes
0
00
000
0000
00000
000000
0000000
00000000
100000000
1110000000
11000000000
111110000000
1111000000000
11111110000000
111111000000000
1111111100000000
11111111101010100
111111111110101011
1111111111111111111

result:

ok good job! (1 test case)

Test #144:

score: 23
Accepted
time: 74ms
memory: 153224kb

input:

1
20 263

output:

Yes
0
00
000
0000
00000
000000
0100000
01000000
100000000
1000000000
10100000000
111110000000
1111000000000
11111100000000
111111100000000
1111111100000000
11111111100010000
111111111100101111
1111111111111111111

result:

ok good job! (1 test case)

Test #145:

score: 23
Accepted
time: 89ms
memory: 152656kb

input:

1
20 286

output:

Yes
0
00
000
0100
01000
010000
0100000
01000000
100000000
1000000000
10110000000
101000000000
1011100000000
10111100000000
111111110000000
1111111000000000
11111111100000010
111111111101000100
1111111111110111111

result:

ok good job! (1 test case)

Test #146:

score: 23
Accepted
time: 63ms
memory: 151156kb

input:

1
19 241

output:

Yes
0
00
000
0000
00000
000000
0000000
00000000
111110000
1000000000
11100000000
110000000000
1111000001000
11111111010000
111111000100001
1111111001000010
11111111110100100
111111111111011111

result:

ok good job! (1 test case)

Test #147:

score: 23
Accepted
time: 75ms
memory: 153116kb

input:

1
20 286

output:

Yes
0
00
000
0100
01000
010000
0100000
01000000
100000000
1000000000
10110000000
101000000000
1011100000000
10111100000000
111111110000000
1111111000000000
11111111100000010
111111111101000100
1111111111110111111

result:

ok good job! (1 test case)

Test #148:

score: 23
Accepted
time: 47ms
memory: 149884kb

input:

1
19 294

output:

No

result:

ok good job! (1 test case)

Test #149:

score: 23
Accepted
time: 60ms
memory: 149608kb

input:

1
19 289

output:

No

result:

ok good job! (1 test case)

Test #150:

score: 23
Accepted
time: 72ms
memory: 152516kb

input:

1
20 338

output:

No

result:

ok good job! (1 test case)

Test #151:

score: 23
Accepted
time: 86ms
memory: 152792kb

input:

1
20 336

output:

No

result:

ok good job! (1 test case)

Test #152:

score: 23
Accepted
time: 86ms
memory: 154272kb

input:

1
20 335

output:

No

result:

ok good job! (1 test case)

Test #153:

score: 23
Accepted
time: 64ms
memory: 150724kb

input:

1
19 19

output:

Yes
0
00
000
1110
10001
110010
1111100
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111

result:

ok good job! (1 test case)

Test #154:

score: 23
Accepted
time: 55ms
memory: 150252kb

input:

1
19 1

output:

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

result:

ok good job! (1 test case)

Test #155:

score: 23
Accepted
time: 88ms
memory: 154048kb

input:

1
20 2

output:

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

result:

ok good job! (1 test case)

Test #156:

score: 23
Accepted
time: 90ms
memory: 152608kb

input:

1
20 40

output:

Yes
0
00
000
0000
10000
110000
1110000
11110000
111110000
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111

result:

ok good job! (1 test case)

Test #157:

score: 23
Accepted
time: 86ms
memory: 152548kb

input:

1
20 18

output:

Yes
0
00
000
1100
10000
111010
1111100
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111

result:

ok good job! (1 test case)

Test #158:

score: 23
Accepted
time: 51ms
memory: 150468kb

input:

1
19 114

output:

Yes
0
00
000
0000
00000
000000
1111000
10000000
111000000
1100000100
11111001000
111111010000
1111111101000
11111111110111
111111111111111
1111111111111111
11111111111111111
111111111111111111

result:

ok good job! (1 test case)

Test #159:

score: 23
Accepted
time: 56ms
memory: 151372kb

input:

1
19 96

output:

Yes
0
00
000
0000
00000
110000
1000000
10000000
111000000
1111000000
11111010000
111111100000
1111111101111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111

result:

ok good job! (1 test case)

Test #160:

score: 23
Accepted
time: 63ms
memory: 153952kb

input:

1
20 152

output:

Yes
0
00
000
0000
00000
000000
0000000
11000000
100000000
1111000000
11100000000
111110000000
1111110000000
11111110101000
111111111010111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111

result:

ok good job! (1 test case)

Test #161:

score: 23
Accepted
time: 84ms
memory: 153552kb

input:

1
20 250

output:

Yes
0
00
000
0000
00000
000000
0000000
00000000
111111100
1000000000
11100000010
110000000100
1111100001000
11110000010000
111111000100000
1111111101000000
11111111110101000
111111111111010111
1111111111111111111

result:

ok good job! (1 test case)

Test #162:

score: 23
Accepted
time: 93ms
memory: 154052kb

input:

1
20 28

output:

Yes
0
01
010
1000
10000
101000
1111000
11111000
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111

result:

ok good job! (1 test case)

Test #163:

score: 23
Accepted
time: 61ms
memory: 150856kb

input:

1
19 68

output:

Yes
0
00
000
0000
00000
111100
1000000
11000010
111000100
1111101000
11111110000
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111

result:

ok good job! (1 test case)

Test #164:

score: 23
Accepted
time: 54ms
memory: 150300kb

input:

1
19 49

output:

Yes
0
00
010
0100
10000
100000
1010000
11110000
111110000
1111110011
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111

result:

ok good job! (1 test case)

Test #165:

score: 23
Accepted
time: 71ms
memory: 153752kb

input:

1
20 21

output:

Yes
0
00
000
1110
10001
111010
1101101
11111110
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111

result:

ok good job! (1 test case)

Test #166:

score: 23
Accepted
time: 71ms
memory: 153296kb

input:

1
20 34

output:

Yes
0
00
000
0000
11000
100000
1110000
11110100
111111011
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111

result:

ok good job! (1 test case)

Test #167:

score: 23
Accepted
time: 95ms
memory: 154116kb

input:

1
20 34

output:

Yes
0
00
000
0000
11000
100000
1110000
11110100
111111011
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111

result:

ok good job! (1 test case)

Test #168:

score: 23
Accepted
time: 20ms
memory: 140976kb

input:

2
13 8
7 3

output:

Yes
0
00
100
1100
11100
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
Yes
0
10
110
1110
11111
111111

result:

ok good job! (2 test cases)

Test #169:

score: 23
Accepted
time: 35ms
memory: 140592kb

input:

3
10 3
3 1
7 0

output:

Yes
0
10
110
1110
11111
111111
1111111
11111111
111111111
Yes
0
10
Yes
1
11
111
1111
11111
111111

result:

ok good job! (3 test cases)

Test #170:

score: 23
Accepted
time: 44ms
memory: 139312kb

input:

4
7 6
6 3
4 2
3 0

output:

Yes
0
11
101
1010
11110
111111
Yes
0
10
110
1110
11111
Yes
0
10
110
Yes
1
11

result:

ok good job! (4 test cases)

Test #171:

score: 23
Accepted
time: 44ms
memory: 146112kb

input:

2
17 120
3 0

output:

Yes
0
00
000
0000
01000
000000
1111100
10000000
100000010
1111000100
11100101000
111111010000
1111111100100
11111111101011
111111111111111
1111111111111111
Yes
1
11

result:

ok good job! (2 test cases)

Test #172:

score: 23
Accepted
time: 31ms
memory: 139492kb

input:

4
6 1
6 7
4 0
4 0

output:

Yes
0
10
111
1111
11111
Yes
0
00
110
1001
11110
Yes
1
11
111
Yes
1
11
111

result:

ok good job! (4 test cases)

Test #173:

score: 23
Accepted
time: 56ms
memory: 150808kb

input:

1
19 181

output:

Yes
0
00
000
0000
00000
000000
0000000
10000000
111100000
1100000000
11100000000
111110000000
1111110000000
11111110010000
111111110100000
1111111111001111
11111111111111111
111111111111111111

result:

ok good job! (1 test case)

Test #174:

score: 23
Accepted
time: 63ms
memory: 151364kb

input:

1
19 17

output:

Yes
0
00
000
1100
10000
111010
1111101
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111

result:

ok good job! (1 test case)

Test #175:

score: 23
Accepted
time: 92ms
memory: 154464kb

input:

1
20 170

output:

Yes
0
00
000
0000
00000
000000
0000000
11111100
100000000
1110000010
11000000100
111100001000
1111100010000
11111110100000
111111111010001
1111111111101111
11111111111111111
111111111111111111
1111111111111111111

result:

ok good job! (1 test case)

Test #176:

score: 23
Accepted
time: 80ms
memory: 154188kb

input:

1
20 30

output:

Yes
0
00
000
0000
10000
110000
1110000
11110000
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111111
111111111111111111
1111111111111111111

result:

ok good job! (1 test case)

Test #177:

score: 23
Accepted
time: 75ms
memory: 152748kb

input:

1
20 183

output:

Yes
0
00
000
0000
00000
010000
0100000
10000000
100000000
1010000000
11110000000
111110000000
1111110000000
11111110000000
111111110000000
1111111110011111
11111111111111111
111111111111111111
1111111111111111111

result:

ok good job! (1 test case)

Subtask #4:

score: 0
Runtime Error

Dependency #3:

100%
Accepted

Test #178:

score: 0
Runtime Error

input:

1
149 540274

output:


result:


Subtask #5:

score: 0
Skipped

Dependency #4:

0%

Subtask #6:

score: 0
Skipped

Dependency #1:

0%