QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#915134#9582. 俄式简餐ybc2025fangzeqiAC ✓7ms3712kbC++142.5kb2025-02-25 21:15:382025-02-25 21:15:38

Judging History

This is the latest submission verdict.

  • [2025-02-25 21:15:38]
  • Judged
  • Verdict: AC
  • Time: 7ms
  • Memory: 3712kb
  • [2025-02-25 21:15:38]
  • Submitted

answer

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 1e5;
namespace MY {
	template<typename t1> bool chkmax(t1&x, const t1&y) {return x < y ? x = y, 1 : 0 ; }
	template<typename t1> bool chkmin(t1&x, const t1&y) {return y < x ? x = y, 1 : 0 ; }
} using namespace MY;
int n, m, x, y, cnt; array<int, 3> a[MAXN + 3];
void cpput(int c, int tot) {
	for (int k = 0; k < tot; ++k) cout << c << ' ';
}
void solve() {
//	cerr << "-------------------------------------" << endl;
	cin >> n >> m, cnt = 0;
	if (n * m % 4 != 0) return cout << "NO\n", void();
	if (n == 2 && m == 2) return cout << "NO\n", void();
	if (n % 4 == 0) {
		cout << "YES\n";
		for (int i = 0; i < (n >> 2); ++i) {
			for (int k = 0; k < 4; ++k)
				for (int j = 1; j <= m; ++j) cout << j + i * m << (j == m ? '\n' : ' ');
		}
		return;
	}
	if (m % 4 == 0) {
		cout << "YES\n";
		for (int i = 1; i <= n; ++i) {
			for (int j = 0; j < (m >> 2); ++j) cpput(++cnt, 4);; cout << '\n'; 
		} 
		return;
	}
	if (m == 2) {
		y = 1, x = (n - 6 * y) / 4;
		cout << "YES\n";
		for (int j = 0; j < x; ++j) {
			cnt += 2;
			for (int k = 0; k < 4; ++k) cout << cnt - 1 << ' ' << cnt << '\n';
		}
		for (int j = 0; j < y; ++j) {
			cnt += 3;
			cout << cnt - 2 << ' ' << cnt - 2 << '\n';
			cout << cnt - 2 << ' ' << cnt - 0 << '\n';
			cout << cnt - 2 << ' ' << cnt - 0 << '\n';
			cout << cnt - 1 << ' ' << cnt - 0 << '\n';
			cout << cnt - 1 << ' ' << cnt - 0 << '\n';
			cout << cnt - 1 << ' ' << cnt - 1 << '\n';
		}
		return;
	}
	if (n % 2 == 0 && m % 2 == 0) {
		y = 1, x = (m - 6 * y) / 4;
		if (4 * x + 6 * y != m) exit(1);
//		for (x = 0, y = 0; 4 * x <= m; ++x) if ( == 0) {y = (m - 4 * x) / 6; break;}
		cout << "YES\n";
		for (int i = 1; i <= n; i += 2) {
			/*x*/for (int j = 0; j < x; ++j) cpput(++cnt, 4), j == x - 1 && y == 0 ? cout << '\n', 1 : 0; 
			for (int j = 0; j < y; ++j) {
				a[j] = {cnt + 1, cnt + 2, cnt + 3}, cnt += 3;
				cpput(a[j][0], 3), cpput(a[j][1], 3);
				if (j == y - 1) cout << '\n';
			} 
			/*x*/for (int j = 0; j < x; ++j) cpput(++cnt, 4), j == x - 1 && y == 0 ? cout << '\n', 1 : 0; 
			for (int j = 0; j < y; ++j) {
				cpput(a[j][0], 1), cpput(a[j][2], 4), cpput(a[j][1], 1);
				if (j == y - 1) cout << '\n';
			}
		}
		return;
	}
	cout << "NO\n";
}
int main() {
	ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#ifdef MYFRE
	freopen("0.in", "r", stdin), freopen("0.out", "w", stdout);
#endif
	int t; cin >> t; while (t--) solve();//, cout << '\n';
}

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3
2 3
2 4
6 8

output:

NO
YES
1 1 1 1 
2 2 2 2 
YES
1 1 1 1 2 2 2 2 
3 3 3 3 4 4 4 4 
5 5 5 5 6 6 6 6 
7 7 7 7 8 8 8 8 
9 9 9 9 10 10 10 10 
11 11 11 11 12 12 12 12 

result:

ok accepted (3 test cases)

Test #2:

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

input:

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

output:

NO
NO
NO
YES
1 1 1 1 
NO
NO
NO
YES
1 1 1 1 2 2 2 2 
NO
NO
NO
YES
1 1 1 1 2 2 2 2 3 3 3 3 
NO
NO
NO
YES
1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 
NO
NO
NO
YES
1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 
NO
NO
NO
YES
1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 
NO
NO
NO
YES
1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5...

result:

ok accepted (784 test cases)

Test #3:

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

input:

2
2 50000
50000 1

output:

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

result:

ok accepted (2 test cases)

Test #4:

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

input:

2
2 49998
49998 1

output:

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

result:

ok accepted (2 test cases)

Test #5:

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

input:

2
100000 1
1 100000

output:

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

result:

ok accepted (2 test cases)

Test #6:

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

input:

2
99999 1
49999 2

output:

NO
NO

result:

ok accepted (2 test cases)

Test #7:

score: 0
Accepted
time: 7ms
memory: 3712kb

input:

100000
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1...

output:

NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
...

result:

ok accepted (100000 test cases)

Test #8:

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

input:

90
25 15
25 23
3 4
2 43
54 23
58 5
72 71
91 24
61 61
20 80
67 75
12 99
24 82
10 100
68 92
34 79
76 42
66 17
7 95
87 67
61 18
60 99
99 53
90 3
80 1
31 8
83 26
94 45
35 74
29 25
9 54
88 12
10 18
79 71
55 79
7 52
51 47
29 63
92 39
1 15
14 2
93 70
26 47
28 72
100 51
96 32
11 56
40 99
11 12
42 47
82 88
3...

output:

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

result:

ok accepted (90 test cases)

Test #9:

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

input:

81
45 59
71 97
56 73
77 31
9 5
98 44
63 1
2 41
88 15
43 29
16 61
25 78
81 90
31 53
80 58
60 53
67 78
71 25
37 62
36 82
53 41
45 58
91 36
6 47
94 63
41 52
80 47
86 79
22 99
84 30
21 59
31 94
45 75
56 99
46 13
52 42
66 51
4 93
52 22
50 23
60 58
27 85
69 7
100 18
50 74
34 44
22 17
49 1
28 63
76 63
55 6...

output:

NO
NO
YES
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30...

result:

ok accepted (81 test cases)

Test #10:

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

input:

4
15 16
46 726
166 274
428 184

output:

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

result:

ok accepted (4 test cases)

Test #11:

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

input:

4
69 612
664 37
72 681
184 323

output:

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

result:

ok accepted (4 test cases)

Test #12:

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

input:

4
61 464
623 89
839 25
320 233

output:

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

result:

ok accepted (4 test cases)

Test #13:

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

input:

6
485 117
609 92
526 13
13 891
632 63
249 13

output:

NO
YES
1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 
24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28 2...

result:

ok accepted (6 test cases)

Test #14:

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

input:

5
998 1
280 332
64 297
46 33
154 141

output:

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

result:

ok accepted (5 test cases)

Test #15:

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

input:

3
1337 45
892 14
47 865

output:

NO
YES
1 2 3 4 5 6 7 8 9 10 11 12 13 14
1 2 3 4 5 6 7 8 9 10 11 12 13 14
1 2 3 4 5 6 7 8 9 10 11 12 13 14
1 2 3 4 5 6 7 8 9 10 11 12 13 14
15 16 17 18 19 20 21 22 23 24 25 26 27 28
15 16 17 18 19 20 21 22 23 24 25 26 27 28
15 16 17 18 19 20 21 22 23 24 25 26 27 28
15 16 17 18 19 20 21 22 23 24 25 26...

result:

ok accepted (3 test cases)

Test #16:

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

input:

2
2908 32
436 115

output:

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

result:

ok accepted (2 test cases)

Test #17:

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

input:

2
14 4359
327 199

output:

NO
NO

result:

ok accepted (2 test cases)

Test #18:

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

input:

2
192 477
519 189

output:

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

result:

ok accepted (2 test cases)

Test #19:

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

input:

5
14 6798
5 210
146 216
9 1373
622 47

output:

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

result:

ok accepted (5 test cases)

Test #20:

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

input:

3
429 141
3840 23
430 7

output:

NO
YES
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41...

result:

ok accepted (3 test cases)

Test #21:

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

input:

3
244 345
101 914
2 1177

output:

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

result:

ok accepted (3 test cases)

Test #22:

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

input:

2
17088 5
47 1856

output:

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

result:

ok accepted (2 test cases)

Test #23:

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

input:

4
510 13
8553 9
9 4560
1 75297

output:

NO
NO
YES
1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 15 16 16 16 16 17 17 17 17 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 27 27 27 27 28...

result:

ok accepted (4 test cases)

Test #24:

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

input:

2
3253 25
2314 31

output:

NO
NO

result:

ok accepted (2 test cases)

Test #25:

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

input:

2
30 2723
31 2562

output:

NO
NO

result:

ok accepted (2 test cases)

Test #26:

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

input:

2
1056 43
21 4663

output:

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

result:

ok accepted (2 test cases)

Test #27:

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

input:

4
644 125
40875 1
1088 12
2535 23

output:

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

result:

ok accepted (4 test cases)

Test #28:

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

input:

3
1 26217
4 9082
89 845

output:

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

result:

ok accepted (3 test cases)

Test #29:

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

input:

2
63 1573
17980 3

output:

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

result:

ok accepted (2 test cases)

Test #30:

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

input:

4
6938 7
184 241
16 4339
729 6

output:

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

result:

ok accepted (4 test cases)

Test #31:

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

input:

2
28 3465
1 52606

output:

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

result:

ok accepted (2 test cases)

Test #32:

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

input:

1
318 314

output:

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

result:

ok accepted (1 test case)

Extra Test:

score: 0
Extra Test Passed