QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#536550#8651. Table Tennislfyszy27 85ms268456kbC++142.4kb2024-08-29 14:30:082024-08-29 14:30:10

Judging History

This is the latest submission verdict.

  • [2024-08-29 14:30:10]
  • Judged
  • Verdict: 27
  • Time: 85ms
  • Memory: 268456kb
  • [2024-08-29 14:30:08]
  • Submitted

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}; break;}
    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:


result:


Subtask #2:

score: 4
Accepted

Test #58:

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

input:

1
4 4

output:

No

result:

ok good job! (1 test case)

Test #59:

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

input:

1
5 10

output:

No

result:

ok good job! (1 test case)

Test #60:

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

input:

1
6 20

output:

No

result:

ok good job! (1 test case)

Test #61:

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

input:

1
7 35

output:

No

result:

ok good job! (1 test case)

Test #62:

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

input:

1
5 10

output:

No

result:

ok good job! (1 test case)

Test #63:

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

input:

1
6 19

output:

No

result:

ok good job! (1 test case)

Test #64:

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

input:

1
6 20

output:

No

result:

ok good job! (1 test case)

Test #65:

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

input:

1
7 33

output:

No

result:

ok good job! (1 test case)

Test #66:

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

input:

1
7 33

output:

No

result:

ok good job! (1 test case)

Test #67:

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

input:

1
4 3

output:

No

result:

ok good job! (1 test case)

Test #68:

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

input:

1
5 8

output:

No

result:

ok good job! (1 test case)

Test #69:

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

input:

1
6 17

output:

No

result:

ok good job! (1 test case)

Test #70:

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

input:

1
7 30

output:

No

result:

ok good job! (1 test case)

Test #71:

score: 4
Accepted
time: 24ms
memory: 146568kb

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: 16ms
memory: 145932kb

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: 7ms
memory: 148332kb

input:

1
4 2

output:

Yes
0
10
110

result:

ok good job! (1 test case)

Test #74:

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

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: 152316kb

input:

1
6 8

output:

Yes
0
00
100
1100
11100

result:

ok good job! (1 test case)

Test #76:

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

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: 16ms
memory: 160012kb

input:

1
6 5

output:

Yes
1
10
100
1100
11100

result:

ok good job! (1 test case)

Test #78:

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

input:

1
6 4

output:

Yes
1
10
110
1100
11110

result:

ok good job! (1 test case)

Test #79:

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

input:

1
7 7

output:

Yes
1
10
110
1100
11100
111100

result:

ok good job! (1 test case)

Test #80:

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

input:

1
7 6

output:

Yes
1
10
111
1101
11010
111110

result:

ok good job! (1 test case)

Test #81:

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

input:

1
7 8

output:

Yes
1
10
100
1100
11100
111100

result:

ok good job! (1 test case)

Test #82:

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

input:

1
6 7

output:

Yes
0
10
100
1100
11100

result:

ok good job! (1 test case)

Test #83:

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

input:

1
6 6

output:

Yes
0
11
101
1010
11110

result:

ok good job! (1 test case)

Test #84:

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

input:

1
7 11

output:

Yes
0
10
100
1000
11100
111100

result:

ok good job! (1 test case)

Test #85:

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

input:

1
7 11

output:

Yes
0
10
100
1000
11100
111100

result:

ok good job! (1 test case)

Test #86:

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

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: 8ms
memory: 156012kb

input:

1
6 6

output:

Yes
0
11
101
1010
11110

result:

ok good job! (1 test case)

Test #88:

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

input:

1
7 9

output:

Yes
0
11
101
1010
11100
111100

result:

ok good job! (1 test case)

Test #89:

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

input:

1
4 3

output:

No

result:

ok good job! (1 test case)

Test #90:

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

input:

1
5 10

output:

No

result:

ok good job! (1 test case)

Test #91:

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

input:

1
6 13

output:

No

result:

ok good job! (1 test case)

Test #92:

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

input:

1
7 23

output:

No

result:

ok good job! (1 test case)

Test #93:

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

input:

1
6 5

output:

Yes
1
10
100
1100
11100

result:

ok good job! (1 test case)

Test #94:

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

input:

1
6 2

output:

Yes
1
11
110
1110
11110

result:

ok good job! (1 test case)

Test #95:

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

input:

1
7 7

output:

Yes
1
10
110
1100
11100
111100

result:

ok good job! (1 test case)

Test #96:

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

input:

1
7 6

output:

Yes
1
10
111
1101
11010
111110

result:

ok good job! (1 test case)

Test #97:

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

input:

1
7 8

output:

Yes
1
10
100
1100
11100
111100

result:

ok good job! (1 test case)

Test #98:

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

input:

1
6 5

output:

Yes
1
10
100
1100
11100

result:

ok good job! (1 test case)

Test #99:

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

input:

1
6 4

output:

Yes
1
10
110
1100
11110

result:

ok good job! (1 test case)

Test #100:

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

input:

1
7 7

output:

Yes
1
10
110
1100
11100
111100

result:

ok good job! (1 test case)

Test #101:

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

input:

1
7 6

output:

Yes
1
10
111
1101
11010
111110

result:

ok good job! (1 test case)

Test #102:

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

input:

1
7 8

output:

Yes
1
10
100
1100
11100
111100

result:

ok good job! (1 test case)

Test #103:

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

input:

1
6 1

output:

Yes
1
11
111
1110
11110

result:

ok good job! (1 test case)

Test #104:

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

input:

1
6 1

output:

Yes
1
11
111
1110
11110

result:

ok good job! (1 test case)

Test #105:

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

input:

1
7 3

output:

Yes
1
11
110
1110
11110
111110

result:

ok good job! (1 test case)

Test #106:

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

input:

1
7 3

output:

Yes
1
11
110
1110
11110
111110

result:

ok good job! (1 test case)

Test #107:

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

input:

1
7 3

output:

Yes
1
11
110
1110
11110
111110

result:

ok good job! (1 test case)

Test #108:

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

input:

1
5 2

output:

Yes
1
10
110
1110

result:

ok good job! (1 test case)

Test #109:

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

input:

1
6 5

output:

Yes
1
10
100
1100
11100

result:

ok good job! (1 test case)

Test #110:

score: 4
Accepted
time: 16ms
memory: 147392kb

input:

2
4 1
3 0

output:

Yes
1
10
110
Yes
1
11

result:

ok good job! (2 test cases)

Test #111:

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

input:

1
6 1

output:

Yes
1
11
111
1110
11110

result:

ok good job! (1 test case)

Test #112:

score: 4
Accepted
time: 14ms
memory: 146336kb

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: 4ms
memory: 150908kb

input:

1
6 1

output:

Yes
1
11
111
1110
11110

result:

ok good job! (1 test case)

Test #114:

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

input:

1
6 4

output:

Yes
1
10
110
1100
11110

result:

ok good job! (1 test case)

Test #115:

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

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: 4ms
memory: 154356kb

input:

1
7 8

output:

Yes
1
10
100
1100
11100
111100

result:

ok good job! (1 test case)

Test #117:

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

input:

1
7 10

output:

Yes
0
10
100
1100
11100
111100

result:

ok good job! (1 test case)

Subtask #3:

score: 23
Accepted

Dependency #2:

100%
Accepted

Test #118:

score: 23
Accepted
time: 53ms
memory: 249516kb

input:

1
19 969

output:

No

result:

ok good job! (1 test case)

Test #119:

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

input:

1
20 1140

output:

No

result:

ok good job! (1 test case)

Test #120:

score: 23
Accepted
time: 59ms
memory: 244204kb

input:

1
19 968

output:

No

result:

ok good job! (1 test case)

Test #121:

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

input:

1
19 969

output:

No

result:

ok good job! (1 test case)

Test #122:

score: 23
Accepted
time: 65ms
memory: 256716kb

input:

1
20 1138

output:

No

result:

ok good job! (1 test case)

Test #123:

score: 23
Accepted
time: 68ms
memory: 256724kb

input:

1
20 1138

output:

No

result:

ok good job! (1 test case)

Test #124:

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

input:

1
20 1140

output:

No

result:

ok good job! (1 test case)

Test #125:

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

input:

1
19 846

output:

No

result:

ok good job! (1 test case)

Test #126:

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

input:

1
20 1003

output:

No

result:

ok good job! (1 test case)

Test #127:

score: 23
Accepted
time: 39ms
memory: 148404kb

input:

5
3 0
3 1
4 0
4 1
4 2

output:

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

result:

ok good job! (5 test cases)

Test #128:

score: 23
Accepted
time: 40ms
memory: 147072kb

input:

5
3 0
3 1
4 0
4 1
4 2

output:

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

result:

ok good job! (5 test cases)

Test #129:

score: 23
Accepted
time: 53ms
memory: 248736kb

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: 72ms
memory: 260536kb

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: 47ms
memory: 247312kb

input:

1
19 274

output:

Yes
0
01
010
0100
01000
100000
1000000
10000000
100000000
1000000000
10100000000
101100000000
1011100000000
11111100000000
111111100000000
1111111100000000
11111111100000000
111111111100000000

result:

ok good job! (1 test case)

Test #132:

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

input:

1
19 271

output:

Yes
0
00
010
0100
01000
100000
1000000
10000000
100000000
1000000000
10100000000
111100000000
1111100000000
11111100000000
111111100000000
1111111100000000
11111111100000000
111111111100000000

result:

ok good job! (1 test case)

Test #133:

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

input:

1
20 289

output:

Yes
0
10
100
1000
10000
100000
1000000
10000000
110000000
1100000000
11000000000
111000000000
1111000000000
11111000000000
111111000000000
1111111000000000
11111111000000000
111111111100000000
1111111111100000000

result:

ok good job! (1 test case)

Test #134:

score: 23
Accepted
time: 68ms
memory: 262452kb

input:

1
20 328

output:

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

result:

ok good job! (1 test case)

Test #135:

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

input:

1
20 313

output:

Yes
0
00
011
0110
10100
101000
1010000
10100000
101000000
1010000000
10100000000
110100000000
1101100000000
11011100000000
110111100000000
1101111100000000
11011111100000000
110111111100000000
1101111111100000000

result:

ok good job! (1 test case)

Test #136:

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

input:

1
19 114

output:

Yes
1
10
110
1110
11111
111110
1111100
11111000
111110000
1111100000
11111000000
111111000000
1111111000000
11111111000000
111111111000000
1111111111000000
11111111111000000
111111111111000000

result:

ok good job! (1 test case)

Test #137:

score: 23
Accepted
time: 49ms
memory: 247960kb

input:

1
19 96

output:

Yes
1
10
100
1100
11100
111111
1111110
11111100
111111000
1111110000
11111100000
111111000000
1111111000000
11111111000000
111111111000000
1111111111000000
11111111111000000
111111111111000000

result:

ok good job! (1 test case)

Test #138:

score: 23
Accepted
time: 68ms
memory: 256776kb

input:

1
20 152

output:

Yes
1
11
111
1111
11110
111101
1111100
11111000
111110000
1111100000
11111000000
111110000000
1111110000000
11111110000000
111111110000000
1111111110000000
11111111110000000
111111111110000000
1111111111110000000

result:

ok good job! (1 test case)

Test #139:

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

input:

1
20 250

output:

Yes
0
10
110
1100
11000
110000
1100000
11000000
110000000
1100000000
11000000000
111100000000
1111100000000
11111100000000
111111100000000
1111111100000000
11111111100000000
111111111100000000
1111111111100000000

result:

ok good job! (1 test case)

Test #140:

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

input:

1
20 28

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111110
1111111111101
11111111111010
111111111111000
1111111111110000
11111111111101000
111111111111111000
1111111111111111000

result:

ok good job! (1 test case)

Test #141:

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

input:

1
19 231

output:

Yes
1
10
100
1000
10100
101000
1100000
11000000
110000000
1100000000
11100000000
111100000000
1111100000000
11111100000000
111111100000000
1111111100000000
11111111100000000
111111111100000000

result:

ok good job! (1 test case)

Test #142:

score: 23
Accepted
time: 39ms
memory: 249432kb

input:

1
19 270

output:

Yes
0
00
000
0000
10000
100000
1000000
10000000
100000000
1000000000
11000000000
111000000000
1111000000000
11111100000000
111111100000000
1111111100000000
11111111100000000
111111111100000000

result:

ok good job! (1 test case)

Test #143:

score: 23
Accepted
time: 66ms
memory: 265744kb

input:

1
20 258

output:

Yes
0
10
101
1100
11000
110000
1100000
11000000
110000000
1100000000
11000000000
111100000000
1111100000000
11111100000000
111111100000000
1111111100000000
11111111100000000
111111111100000000
1111111111100000000

result:

ok good job! (1 test case)

Test #144:

score: 23
Accepted
time: 85ms
memory: 268212kb

input:

1
20 263

output:

Yes
1
10
101
1010
11000
110000
1100000
11000000
110000000
1100000000
11000000000
110100000000
1111100000000
11111100000000
111111100000000
1111111100000000
11111111100000000
111111111100000000
1111111111100000000

result:

ok good job! (1 test case)

Test #145:

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

input:

1
20 286

output:

Yes
0
10
101
1010
10100
101000
1010000
10100000
110000000
1100000000
11000000000
110100000000
1101100000000
11011100000000
110111100000000
1111111100000000
11111111100000000
111111111100000000
1111111111100000000

result:

ok good job! (1 test case)

Test #146:

score: 23
Accepted
time: 66ms
memory: 247700kb

input:

1
19 241

output:

Yes
0
10
100
1001
10010
101100
1011000
11010000
110100000
1101000000
11010000000
111010000000
1110110000000
11101110000000
111011110000000
1110111110000000
11101111110000000
111011111110000000

result:

ok good job! (1 test case)

Test #147:

score: 23
Accepted
time: 69ms
memory: 257184kb

input:

1
20 286

output:

Yes
0
10
101
1010
10100
101000
1010000
10100000
110000000
1100000000
11000000000
110100000000
1101100000000
11011100000000
110111100000000
1111111100000000
11111111100000000
111111111100000000
1111111111100000000

result:

ok good job! (1 test case)

Test #148:

score: 23
Accepted
time: 59ms
memory: 251980kb

input:

1
19 294

output:

No

result:

ok good job! (1 test case)

Test #149:

score: 23
Accepted
time: 58ms
memory: 246436kb

input:

1
19 289

output:

No

result:

ok good job! (1 test case)

Test #150:

score: 23
Accepted
time: 78ms
memory: 266652kb

input:

1
20 338

output:

No

result:

ok good job! (1 test case)

Test #151:

score: 23
Accepted
time: 85ms
memory: 268456kb

input:

1
20 336

output:

No

result:

ok good job! (1 test case)

Test #152:

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

input:

1
20 335

output:

No

result:

ok good job! (1 test case)

Test #153:

score: 23
Accepted
time: 70ms
memory: 249812kb

input:

1
19 19

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111110
1111111111100
11111111111100
111111111111000
1111111111111000
11111111111111000
111111111111111000

result:

ok good job! (1 test case)

Test #154:

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

input:

1
19 1

output:

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

result:

ok good job! (1 test case)

Test #155:

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

input:

1
20 2

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111111
11111111111111
111111111111111
1111111111111111
11111111111111110
111111111111111110
1111111111111111110

result:

ok good job! (1 test case)

Test #156:

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

input:

1
20 40

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111110
111111111100
1111111111000
11111111110000
111111111110000
1111111111110000
11111111111110000
111111111111110000
1111111111111110000

result:

ok good job! (1 test case)

Test #157:

score: 23
Accepted
time: 69ms
memory: 263708kb

input:

1
20 18

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111111
1111111111110
11111111111101
111111111111100
1111111111111000
11111111111111000
111111111111111000
1111111111111111000

result:

ok good job! (1 test case)

Test #158:

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

input:

1
19 114

output:

Yes
1
10
110
1110
11111
111110
1111100
11111000
111110000
1111100000
11111000000
111111000000
1111111000000
11111111000000
111111111000000
1111111111000000
11111111111000000
111111111111000000

result:

ok good job! (1 test case)

Test #159:

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

input:

1
19 96

output:

Yes
1
10
100
1100
11100
111111
1111110
11111100
111111000
1111110000
11111100000
111111000000
1111111000000
11111111000000
111111111000000
1111111111000000
11111111111000000
111111111111000000

result:

ok good job! (1 test case)

Test #160:

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

input:

1
20 152

output:

Yes
1
11
111
1111
11110
111101
1111100
11111000
111110000
1111100000
11111000000
111110000000
1111110000000
11111110000000
111111110000000
1111111110000000
11111111110000000
111111111110000000
1111111111110000000

result:

ok good job! (1 test case)

Test #161:

score: 23
Accepted
time: 82ms
memory: 265936kb

input:

1
20 250

output:

Yes
0
10
110
1100
11000
110000
1100000
11000000
110000000
1100000000
11000000000
111100000000
1111100000000
11111100000000
111111100000000
1111111100000000
11111111100000000
111111111100000000
1111111111100000000

result:

ok good job! (1 test case)

Test #162:

score: 23
Accepted
time: 81ms
memory: 268348kb

input:

1
20 28

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111110
1111111111101
11111111111010
111111111111000
1111111111110000
11111111111101000
111111111111111000
1111111111111111000

result:

ok good job! (1 test case)

Test #163:

score: 23
Accepted
time: 43ms
memory: 247932kb

input:

1
19 68

output:

Yes
1
11
111
1111
11111
111111
1111111
11111110
111111100
1111111000
11111110100
111111110000
1111111100000
11111111100000
111111111100000
1111111111100000
11111111111100000
111111111111100000

result:

ok good job! (1 test case)

Test #164:

score: 23
Accepted
time: 57ms
memory: 242308kb

input:

1
19 49

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111110
1111111100
11111111100
111111111000
1111111110000
11111111100000
111111111100000
1111111111110000
11111111111110000
111111111111110000

result:

ok good job! (1 test case)

Test #165:

score: 23
Accepted
time: 76ms
memory: 256836kb

input:

1
20 21

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111110
11111111110
111111111111
1111111111110
11111111111100
111111111111000
1111111111111000
11111111111111000
111111111111111000
1111111111111111000

result:

ok good job! (1 test case)

Test #166:

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

input:

1
20 34

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111110
111111111110
1111111111100
11111111111000
111111111110000
1111111111110000
11111111111110000
111111111111110000
1111111111111110000

result:

ok good job! (1 test case)

Test #167:

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

input:

1
20 34

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111110
111111111110
1111111111100
11111111111000
111111111110000
1111111111110000
11111111111110000
111111111111110000
1111111111111110000

result:

ok good job! (1 test case)

Test #168:

score: 23
Accepted
time: 21ms
memory: 185648kb

input:

2
13 8
7 3

output:

Yes
1
11
111
1111
11111
111111
1111111
11111110
111111100
1111111100
11111111100
111111111100
Yes
1
11
110
1110
11110
111110

result:

ok good job! (2 test cases)

Test #169:

score: 23
Accepted
time: 32ms
memory: 177948kb

input:

3
10 3
3 1
7 0

output:

Yes
1
11
111
1111
11111
111110
1111110
11111110
111111110
Yes
0
10
Yes
1
11
111
1111
11111
111111

result:

ok good job! (3 test cases)

Test #170:

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

input:

4
7 6
6 3
4 2
3 0

output:

Yes
1
10
111
1101
11010
111110
Yes
1
10
110
1110
11110
Yes
0
10
110
Yes
1
11

result:

ok good job! (4 test cases)

Test #171:

score: 23
Accepted
time: 39ms
memory: 231428kb

input:

2
17 120
3 0

output:

Yes
1
10
110
1110
11100
111000
1110000
11100000
111000000
1110000000
11111000000
111111000000
1111111000000
11111111000000
111111111000000
1111111111000000
Yes
1
11

result:

ok good job! (2 test cases)

Test #172:

score: 23
Accepted
time: 40ms
memory: 152368kb

input:

4
6 1
6 7
4 0
4 0

output:

Yes
1
11
111
1110
11110
Yes
0
10
100
1100
11100
Yes
1
11
111
Yes
1
11
111

result:

ok good job! (4 test cases)

Test #173:

score: 23
Accepted
time: 65ms
memory: 247156kb

input:

1
19 181

output:

Yes
1
11
110
1100
11100
111000
1110000
11100000
111000000
1110000000
11110000000
111110000000
1111110000000
11111110000000
111111110000000
1111111110000000
11111111110000000
111111111110000000

result:

ok good job! (1 test case)

Test #174:

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

input:

1
19 17

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111110
1111111111110
11111111111100
111111111111000
1111111111111000
11111111111111000
111111111111111000

result:

ok good job! (1 test case)

Test #175:

score: 23
Accepted
time: 70ms
memory: 266184kb

input:

1
20 170

output:

Yes
0
10
110
1111
11110
111100
1111000
11110000
111100000
1111000000
11110000000
111110000000
1111110000000
11111110000000
111111110000000
1111111110000000
11111111110000000
111111111110000000
1111111111110000000

result:

ok good job! (1 test case)

Test #176:

score: 23
Accepted
time: 66ms
memory: 262800kb

input:

1
20 30

output:

Yes
1
11
111
1111
11111
111111
1111111
11111111
111111111
1111111111
11111111111
111111111110
1111111111100
11111111111000
111111111110000
1111111111110000
11111111111110000
111111111111110000
1111111111111110000

result:

ok good job! (1 test case)

Test #177:

score: 23
Accepted
time: 76ms
memory: 259300kb

input:

1
20 183

output:

Yes
1
11
111
1110
11100
111100
1111000
11110000
111100000
1111000000
11110000000
111100000000
1111100000000
11111110000000
111111110000000
1111111110000000
11111111110000000
111111111110000000
1111111111110000000

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%