QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#116370#4883. Bayan Testingliuzhenhao09RE 37ms6120kbC++14830b2023-06-28 16:25:512023-06-28 16:25:55

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-06-28 16:25:55]
  • 评测
  • 测评结果:RE
  • 用时:37ms
  • 内存:6120kb
  • [2023-06-28 16:25:51]
  • 提交

answer

#include<bits/stdc++.h>
#define int long long
using namespace std;
struct node{
	int len,l,r;
	bool operator <(const node& kkk)const{
		return len < kkk.len || (len == kkk.len && l < kkk.l);
	}
}a[100010];
int T;
int n,m;
int ans[200010];
signed main(){
	scanf("%lld",&T);
	while(T--){
		scanf("%lld %lld",&n,&m);
		for(int i = 1,l,r; i <= 2 * m; i++){
			scanf("%lld %lld",&l,&r);
			a[i].len = r - l + 1;
			a[i].l = l;
			a[i].r = r;
		}
		sort(a + 1,a + 2 * m + 1);
		int d = a[m + 1].len,R = a[m + 1].r;
		if(d == 1){
			printf("-1\n");
			continue;
		}
		for(int i = 1; i <= d; i++) ans[i] = i;
		for(int i = d + 1; i < R; i++) ans[i] = ans[i - d];
		for(int i = R; i <= n; i++) ans[i] = ans[i - d + 1];
		for(int i = 1; i <= n; i++) printf("%lld ",ans[i]);
		printf("\n");
	}
	return 0;
}

详细

Test #1:

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

input:

3
2 1
1 1
2 2
6 2
1 3
4 6
2 4
3 5
4 3
1 2
1 1
2 2
2 3
3 3
3 4

output:

-1
1 2 3 1 3 1 
1 1 1 1 

result:

ok ok (3 test cases)

Test #2:

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

input:

100000
2 1
1 1
2 2
2 1
2 2
1 2
2 1
1 2
2 2
2 1
1 2
2 2
2 1
2 2
1 2
2 1
2 2
1 1
2 1
1 1
2 2
2 1
1 2
2 2
2 1
2 2
1 1
2 1
2 2
1 2
2 1
2 2
1 1
2 1
2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2 3 4 1 2 3 4 1 2 3 4 2 
1 2 3 4 5 6 1 3 4 5 6 1 3 
1 2 3 1 2 1 
1 2 3 4 1 3 4 1 3...

result:

ok ok (25000 test cases)

Test #4:

score: 0
Accepted
time: 35ms
memory: 5676kb

input:

10000
22 11
2 5
6 9
11 22
10 18
15 19
6 19
6 15
8 13
2 13
8 18
13 17
10 12
3 11
11 18
12 17
13 18
7 8
17 18
11 15
5 15
5 20
18 19
23 11
10 21
1 10
4 21
15 21
12 21
2 14
7 15
2 6
6 15
2 22
1 21
12 13
2 10
11 19
4 22
10 10
7 12
5 17
11 22
22 22
3 12
5 9
18 9
4 12
12 12
4 18
1 13
8 10
3 4
7 15
2 12
17 ...

output:

1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 1 2 3 4 5 
1 2 3 4 5 6 7 8 9 10 1 3 4 5 6 7 8 9 10 1 3 4 5 
1 2 3 4 5 6 7 1 2 3 4 5 6 7 1 2 3 4 
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 4 5 6 7 
1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 7 8 9 
1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 6 
1 2 3 4 5 6 7 8 1 2 3 4 6 7 8 ...

result:

ok ok (10000 test cases)

Test #5:

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

input:

5000
36 18
9 14
2 17
8 32
3 32
15 24
14 29
9 20
24 27
22 36
4 9
24 28
16 34
5 33
31 35
13 33
2 32
5 31
22 29
25 31
26 31
7 7
11 11
7 15
2 4
2 3
21 34
26 35
6 20
1 10
2 35
7 24
1 27
1 18
9 13
4 34
10 11
56 28
24 29
22 37
41 43
36 56
25 45
26 54
3 28
14 29
11 18
1 6
7 50
5 27
3 3
41 46
38 38
47 52
6 1...

output:

1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 9 10 11 12 1 2 3 4 5 6 7 9 10 11 12 1 2 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 4 5 6 7 8 9 11 12 13 14 15 1 2 3 4 5 6 7 8 9 11 12 13 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1...

result:

ok ok (5000 test cases)

Test #6:

score: 0
Accepted
time: 35ms
memory: 3600kb

input:

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

output:

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 14 1 2 3 4 5 6 7 8 9 10 11 12 14 1 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 13 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18...

result:

ok ok (4000 test cases)

Test #7:

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

input:

3000
65 32
38 46
59 65
18 19
50 54
15 20
31 35
38 61
12 65
17 36
17 23
19 57
58 60
1 54
14 47
52 60
9 46
38 53
34 49
16 60
6 40
47 51
33 45
2 35
8 11
14 15
16 30
11 61
21 40
30 30
15 50
23 34
27 38
21 28
36 37
4 51
47 53
26 37
15 52
41 52
56 65
1 32
60 61
62 65
25 33
36 45
1 7
38 43
55 62
2 42
10 25...

output:

1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 5 6 7 8 9 10 11 12 1 2 3 5 6 7 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...

result:

ok ok (3000 test cases)

Test #8:

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

input:

2000
96 48
62 74
45 59
40 76
15 46
3 82
31 48
31 94
66 91
77 96
53 80
9 65
3 4
5 78
28 34
7 55
23 51
4 61
4 57
36 86
59 68
89 94
47 67
53 74
48 60
53 91
39 95
18 60
50 88
7 75
87 90
8 44
22 63
58 85
12 68
37 90
3 26
18 50
86 94
62 88
50 54
59 61
91 93
17 32
63 80
40 44
5 95
45 91
49 91
36 53
30 36
4...

output:

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 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 26 27 28 29 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 26 27 28 29 1 2 3 4 5 6 7 8 9 10 11 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19...

result:

ok ok (2000 test cases)

Test #9:

score: 0
Accepted
time: 37ms
memory: 5620kb

input:

1500
147 73
5 92
4 46
113 113
14 113
54 126
17 36
83 94
99 110
55 69
24 97
20 82
43 91
131 137
22 115
96 97
3 83
51 96
73 123
40 71
79 137
25 135
49 60
4 44
74 124
114 141
39 115
9 48
83 112
11 46
80 139
37 125
8 59
43 136
122 124
111 115
85 131
35 89
75 129
16 19
27 77
82 118
19 137
17 109
82 101
3...

output:

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 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 1 2 3 5 6 7 8 9 10 11 12 13 14 15 16 17 18...

result:

ok ok (1500 test cases)

Test #10:

score: 0
Accepted
time: 29ms
memory: 3828kb

input:

1000
188 94
142 175
49 149
53 186
33 144
128 167
81 123
40 95
7 134
82 157
95 95
167 178
5 34
42 52
68 71
118 157
108 114
7 33
95 144
126 165
79 126
49 68
3 39
30 63
100 182
11 18
66 72
99 109
5 8
39 52
13 188
83 101
107 118
58 165
34 176
41 94
61 74
8 159
157 165
21 45
3 137
131 183
90 165
83 100
7...

output:

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

result:

ok ok (1000 test cases)

Test #11:

score: 0
Accepted
time: 36ms
memory: 5624kb

input:

500
392 196
1 389
69 348
155 217
305 339
211 303
73 145
14 245
2 11
41 78
80 279
92 390
313 355
29 164
189 284
52 381
67 150
220 242
281 352
276 389
26 352
164 346
107 125
292 357
97 312
100 335
85 241
83 173
136 299
170 335
30 84
36 329
143 298
13 139
268 309
281 384
116 293
103 116
120 284
209 305...

output:

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

result:

ok ok (500 test cases)

Test #12:

score: 0
Accepted
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 1 3 1 3 1 
1 2 1 2 2 2 2 2 
1 1 1 
1 2 3 2 3 2 3 
1 2 3 1 3 1 3 1 3 
1 2 3 1 2 3 1 2 1 2 
1 2 1 2 1 1 
1 2 3 1 3 1 3 1 
1 1 1 
1 2 3 4 1 2 3 4 1 2 
1 2 3 1 3 1 3 
1 2 3 1 2 1 2 1 
1 2 1 2 1 2 1 
1 2 2 
1 2 1 2 1 2 1 2 
1 2 1 2 1 1 
1 2 1 1 1 
1 2 1 2 ...

result:

ok ok (15702 test cases)

Test #14:

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

input:

4960
9 20
1 3
1 7
1 2
2 3
8 8
2 4
7 8
9 9
6 8
3 4
3 9
6 6
2 5
5 9
3 7
7 9
4 5
4 7
2 6
4 9
4 8
3 3
5 8
8 9
1 4
5 6
3 8
1 5
2 8
3 5
1 8
1 1
2 2
5 5
6 7
7 7
1 6
4 4
5 7
6 9
3 2
1 3
2 2
3 3
1 1
11 16
4 11
9 10
3 4
2 10
4 9
6 7
3 7
6 10
1 7
7 11
7 7
1 6
1 9
10 11
5 9
4 7
8 10
3 6
5 5
1 10
6 11
3 10
5 7
7...

output:

1 2 3 1 2 3 2 3 2 
-1
1 2 3 4 1 2 4 1 2 4 1 
1 2 3 4 1 3 4 1 3 4 1 
1 2 3 4 1 2 3 1 2 3 
1 1 1 1 1 
1 2 3 4 1 3 
1 2 3 1 2 1 2 
1 2 3 4 5 1 3 4 5 1 
1 2 3 4 1 2 3 1 2 3 1 2 
1 2 3 4 5 6 7 1 3 4 5 6 7 1 3 4 5 6 7 1 
1 2 3 1 2 3 1 3 
-1
1 2 3 4 5 6 1 2 3 4 5 6 1 2 4 5 6 
1 2 1 1 
1 2 3 4 5 6 7 8 1 2 3...

result:

ok ok (4960 test cases)

Test #15:

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

input:

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

output:

1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 4 5 6 7 8 9 10 1 2 4 
1 1 1 
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 3 4 5 
1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6 1 2 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 4 5 6 8 9 10 11 12 13 14 15 1 2 3 4 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 ...

result:

ok ok (871 test cases)

Test #16:

score: 0
Accepted
time: 26ms
memory: 5732kb

input:

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

output:

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

result:

ok ok (929 test cases)

Test #17:

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

input:

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

output:

1 2 3 4 5 6 7 8 9 10 11 1 2 3 4 5 6 7 8 9 10 11 2 3 4 5 6 7 8 9 10 11 2 3 
1 2 3 4 1 3 4 1 3 4 1 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 3 4 5 6 7 8 9 10 
1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 9 10 1 2 3 4 
1 2 3 4 5 6 7 1 2 3 4 ...

result:

ok ok (934 test cases)

Test #18:

score: 0
Accepted
time: 29ms
memory: 5856kb

input:

216
78 478
13 77
47 50
6 66
66 73
5 14
35 45
3 57
16 43
39 40
44 52
48 52
72 72
45 71
50 66
16 50
24 45
40 76
53 74
25 28
28 66
41 58
9 56
13 44
6 21
26 77
3 25
3 50
53 58
15 68
3 48
38 61
33 65
5 39
43 73
8 78
30 41
57 62
41 46
20 33
31 45
18 27
14 58
63 64
47 57
29 70
1 51
27 61
36 58
25 46
5 65
7...

output:

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 12 13 14 15 16 17 18 19 20 21 22 23 1 2 3 4 5 6 7 8 9 10 
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 1 2 3 4 5 6 7 8 9 10 11...

result:

ok ok (216 test cases)

Test #19:

score: 0
Accepted
time: 18ms
memory: 5640kb

input:

243
10 19
3 7
1 6
4 10
4 8
5 8
1 9
2 5
3 9
3 3
1 5
5 10
2 10
3 4
3 6
5 9
2 2
2 6
4 7
6 6
4 9
7 7
3 5
7 9
3 8
5 5
6 8
2 9
1 7
4 5
7 8
7 10
1 8
9 9
2 8
2 7
1 2
3 10
8 8
87 218
19 76
44 64
22 42
29 51
12 46
15 17
65 68
8 37
32 42
13 83
21 51
18 86
8 41
21 36
34 82
5 78
52 74
29 56
12 76
52 63
20 67
66 ...

output:

1 2 3 4 1 2 3 4 1 2 
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 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 2 3 4 5 6 7 8 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 2 3...

result:

ok ok (243 test cases)

Test #20:

score: 0
Accepted
time: 28ms
memory: 5856kb

input:

207
49 111
29 35
17 17
6 31
3 30
38 41
22 30
8 41
5 20
6 16
31 34
24 36
11 19
16 38
7 35
30 35
14 36
13 30
14 45
30 42
23 38
1 6
6 42
36 46
15 47
30 47
8 45
22 48
42 46
2 31
6 12
24 49
4 42
2 10
29 30
14 18
6 27
30 48
36 36
8 47
12 41
4 43
1 22
18 23
6 26
25 41
4 27
7 32
9 20
35 48
11 38
11 39
7 48
...

output:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 3 4 5 
1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 1 3 4 5 6 7 8 9 10 11 12 1 3 4 5 6 7 8 9 10 11 
1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 
1 2 3 4 ...

result:

ok ok (207 test cases)

Test #21:

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

input:

66
164 5146
112 153
31 50
121 160
112 149
34 101
46 59
46 118
71 151
42 157
99 153
9 11
58 83
34 89
5 155
102 153
56 157
83 104
83 87
7 77
43 137
40 152
36 47
65 104
43 110
4 68
56 134
11 130
130 159
1 108
44 158
16 78
68 91
12 135
35 120
41 146
85 152
95 120
106 132
27 119
16 88
46 111
17 138
30 82...

output:

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 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 40 41 42 43 44 45 46 47 48 49 1 2 3 4 5 6 7 8 9 10 11 12 ...

result:

ok ok (66 test cases)

Test #22:

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

input:

26
259 10209
140 162
33 206
18 209
102 147
159 256
138 143
117 257
19 217
70 247
81 215
74 171
24 76
56 167
63 79
146 202
183 203
1 119
95 131
192 194
181 205
39 235
118 158
184 204
116 130
102 214
94 183
36 170
73 120
13 16
17 76
37 96
65 86
72 109
36 249
6 210
25 41
71 91
18 149
66 110
186 222
27 ...

output:

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 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30...

result:

ok ok (26 test cases)

Test #23:

score: 0
Accepted
time: 27ms
memory: 6120kb

input:

15
110 874
86 90
38 53
36 71
95 108
13 95
24 38
6 57
9 32
48 71
60 87
36 99
79 84
3 40
1 18
25 98
72 102
26 43
56 98
5 15
13 27
17 25
22 27
58 64
85 89
58 88
5 11
2 34
62 69
109 109
49 99
28 39
4 49
20 105
43 53
25 45
25 96
1 22
40 57
1 103
34 42
39 97
23 69
49 65
30 81
14 27
41 86
17 78
58 100
83 8...

output:

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 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 26 27 28 29 30 31 32 33 34 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 26 27 28 29 30 31 32 33 34 1 2 3 4 5 6 7 8 9 10 
1 2 3...

result:

ok ok (15 test cases)

Test #24:

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

input:

13
216 4476
108 125
45 173
117 126
95 127
157 199
128 167
119 216
53 93
67 214
38 58
19 25
14 135
114 171
29 48
4 143
43 199
22 74
98 211
31 106
106 140
26 204
14 199
158 167
65 186
123 152
80 203
182 216
78 139
47 176
162 204
11 95
83 197
58 69
138 184
1 59
186 191
105 173
48 97
35 109
45 64
124 13...

output:

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

result:

ok ok (13 test cases)

Test #25:

score: -100
Runtime Error

input:

1
200000 100000
5435 51605
65565 190063
140607 193643
31380 45537
3961 55383
25625 38764
27570 135633
35840 167150
126881 193680
19261 139009
110761 185612
25060 168287
23579 129939
31514 88726
127835 171458
48657 82850
19153 176202
117009 136283
38162 106216
70625 130422
56502 121622
86260 142727
3...

output:


result: