QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#647595#4883. Bayan Testingship2077AC ✓219ms6312kbC++23886b2024-10-17 14:50:592024-10-17 14:51:00

Judging History

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

  • [2024-10-17 14:51:00]
  • 评测
  • 测评结果:AC
  • 用时:219ms
  • 内存:6312kb
  • [2024-10-17 14:50:59]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
constexpr int M=2e5+5,inf=1e9;
int n,m,num,cur,ans[M];
struct info{ int l,r;
    bool operator <(const info &a) const
        {return r==a.r?l>a.l:r<a.r;}
}a[M];
int read(){
    int x=0;char ch=getchar();
    while (!isdigit(ch)) ch=getchar();
    while (isdigit(ch)) x=x*10+ch-48,ch=getchar();
    return x;
}
void solve(){
    n=read();m=read();num=0;
    for (int i=1;i<=m<<1;i++){
        int l=read(),r=read();
        if (l<r) a[++num]={l,r};
    }
    if (num<m) return puts("-1"),void();
    sort(a+1,a+num+1);
    for (int i=1;i<=num;i++) cerr<<a[i].l<<','<<a[i].r<<'\n';
    for (int i=1;i<=n;i++) ans[i]=i;
    ans[a[num-m+1].l]=inf;
    for (int i=a[num-m+1].r;i<=n;i++) ans[i]=inf;
    for (int i=1;i<=n;i++) printf("%d%c",ans[i]," \n"[i==n]);
}
int main(){int T=read();while (T--) solve();return 0;}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3856kb

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 1000000000 4 1000000000 1000000000
1000000000 1000000000 1000000000 1000000000

result:

ok ok (3 test cases)

Test #2:

score: 0
Accepted
time: 84ms
memory: 5840kb

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

output:

-1
1000000000 1000000000
1000000000 1000000000
1000000000 1000000000
1000000000 1000000000
-1
-1
1000000000 1000000000
-1
1000000000 1000000000
-1
1000000000 1000000000
1000000000 1000000000
-1
-1
1000000000 1000000000
1000000000 1000000000
1000000000 1000000000
1000000000 1000000000
-1
1000000000 1...

result:

ok ok (100000 test cases)

Test #3:

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

input:

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

output:

1 2 3 4 1000000000 6 7 1000000000 1000000000 1000000000
1 2 3 1000000000 5 6 7 1000000000 1000000000 1000000000 1000000000
1000000000 2 1000000000 1000000000 1000000000
1000000000 2 3 4 1000000000 1000000000
1 2 1000000000 1000000000 1000000000 1000000000 1000000000
1000000000 2 3 4 1000000000 10000...

result:

ok ok (25000 test cases)

Test #4:

score: 0
Accepted
time: 147ms
memory: 3848kb

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

result:

ok ok (10000 test cases)

Test #5:

score: 0
Accepted
time: 152ms
memory: 3980kb

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

result:

ok ok (5000 test cases)

Test #6:

score: 0
Accepted
time: 159ms
memory: 3860kb

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 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1000000000 33 34 35 36 37 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 100...

result:

ok ok (4000 test cases)

Test #7:

score: 0
Accepted
time: 215ms
memory: 3976kb

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 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 1000000000 39 40 41 42 43 44 45 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1...

result:

ok ok (3000 test cases)

Test #8:

score: 0
Accepted
time: 171ms
memory: 3852kb

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

result:

ok ok (2000 test cases)

Test #9:

score: 0
Accepted
time: 171ms
memory: 5836kb

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 47 48 49 50 51 52 53 54 55 56 57 58 1000000000 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 ...

result:

ok ok (1500 test cases)

Test #10:

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

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

result:

ok ok (1000 test cases)

Test #11:

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

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

result:

ok ok (500 test cases)

Test #12:

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

input:

41902
4 1
1 4
1 1
2 1
1 2
2 2
4 2
2 2
1 4
3 3
1 3
3 2
1 2
2 2
1 1
3 3
3 1
3 3
1 2
3 1
1 1
2 2
2 1
1 1
2 2
3 1
1 1
1 2
2 1
2 2
1 1
5 7
5 5
1 1
3 5
1 2
2 3
2 2
4 5
2 4
1 5
2 5
3 4
3 3
4 4
1 3
5 5
2 4
4 4
1 3
3 3
3 4
2 5
1 1
2 2
1 2
5 5
5 4
3 5
5 5
2 5
2 2
1 3
2 3
1 5
4 4
3 2
1 3
1 1
2 2
1 2
4 3
1 4
3 ...

output:

1000000000 2 3 1000000000
1000000000 1000000000
1000000000 2 1000000000 1000000000
-1
1000000000 1000000000 1000000000
-1
-1
1000000000 1000000000 1000000000
-1
1000000000 2 1000000000 1000000000 1000000000
1000000000 1000000000 1000000000 1000000000 1000000000
1000000000 2 1000000000 1000000000 100...

result:

ok ok (41902 test cases)

Test #13:

score: 0
Accepted
time: 124ms
memory: 3860kb

input:

15702
9 7
1 4
3 6
4 4
4 5
7 8
1 1
4 9
5 7
1 8
3 4
5 6
6 6
7 9
1 7
7 13
4 5
1 7
2 5
6 7
1 4
1 3
4 4
1 1
1 2
2 4
5 6
4 7
3 6
2 7
2 2
3 7
5 7
3 3
6 6
2 6
3 4
4 6
5 5
1 5
1 6
2 3
4 2
3 4
2 2
2 3
2 4
8 14
5 7
1 6
4 6
1 3
8 8
1 1
5 8
2 6
3 3
3 7
2 2
6 6
6 7
4 8
6 8
4 5
3 8
1 2
5 6
3 5
5 5
4 7
1 5
7 7
2 4
...

output:

1 2 1000000000 4 5 1000000000 1000000000 1000000000 1000000000
1 1000000000 3 4 1000000000 1000000000 1000000000
1 2 1000000000 1000000000
1 2 3 4 1000000000 1000000000 1000000000 1000000000
1 2 3 1000000000 1000000000 1000000000 1000000000 1000000000
1000000000 1000000000 1000000000
1 2 1000000000 ...

result:

ok ok (15702 test cases)

Test #14:

score: 0
Accepted
time: 124ms
memory: 3980kb

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

result:

ok ok (4960 test cases)

Test #15:

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

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

result:

ok ok (871 test cases)

Test #16:

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

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 1000000000 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000
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 1000000000 34 35 36 37 38 1000000000 1000000000 100000000...

result:

ok ok (929 test cases)

Test #17:

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

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

result:

ok ok (934 test cases)

Test #18:

score: 0
Accepted
time: 179ms
memory: 3824kb

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 24 25 26 27 28 1000000000 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 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000...

result:

ok ok (216 test cases)

Test #19:

score: 0
Accepted
time: 215ms
memory: 3892kb

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:

1000000000 2 3 4 5 6 1000000000 1000000000 1000000000 1000000000
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 1000000000 1000000000 1000000000 1000000000 1000000000 100000000...

result:

ok ok (243 test cases)

Test #20:

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

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

result:

ok ok (207 test cases)

Test #21:

score: 0
Accepted
time: 167ms
memory: 4076kb

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

result:

ok ok (66 test cases)

Test #22:

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

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

result:

ok ok (26 test cases)

Test #23:

score: 0
Accepted
time: 188ms
memory: 4276kb

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 35 36 37 38 39 40 41 42 43 44 45 46 47 1000000000 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 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1...

result:

ok ok (15 test cases)

Test #24:

score: 0
Accepted
time: 184ms
memory: 4128kb

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

result:

ok ok (13 test cases)

Test #25:

score: 0
Accepted
time: 171ms
memory: 6180kb

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:

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 (1 test case)

Test #26:

score: 0
Accepted
time: 183ms
memory: 6212kb

input:

1
199921 99985
103056 143610
165590 191047
63600 63838
123160 188419
104260 147276
112410 185579
2700 179127
78472 164457
114801 145423
191999 196291
90822 177869
51896 145573
74782 131827
160438 167805
52443 141624
146562 158836
70400 119165
115232 127784
24895 47913
128942 175540
40145 41946
93417...

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 (1 test case)

Test #27:

score: 0
Accepted
time: 143ms
memory: 6312kb

input:

1
199907 99603
84324 152188
68856 157591
918 87087
86133 120796
44517 106591
79065 142117
75031 153216
194825 196384
67470 114247
19127 140381
51212 197585
132561 171506
59403 177050
137553 195682
135941 146610
45358 57782
2628 161890
71022 189271
34370 86323
19542 108262
38970 59100
116781 122224
1...

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 (1 test case)

Test #28:

score: 0
Accepted
time: 175ms
memory: 6132kb

input:

1
199187 99820
148565 160009
140518 171681
75059 140113
40970 117651
46813 120478
41658 177438
126700 183863
89947 152361
35812 121754
129088 186431
98884 159523
43327 99423
58054 151417
125288 173885
6257 78052
132171 180569
103064 111103
103720 117210
12343 66848
30679 96271
89720 162883
28897 191...

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 (1 test case)

Test #29:

score: 0
Accepted
time: 187ms
memory: 6192kb

input:

1
199402 99528
59883 73211
154329 197322
106362 122643
148179 186347
5919 101638
181550 189040
30498 86234
18736 98684
5528 113409
55716 187444
18658 125497
51054 165466
21111 86450
6115 67650
22324 149626
73894 129025
11036 170928
84030 147342
183697 192954
96225 165374
165196 169809
40552 58094
47...

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 (1 test case)

Test #30:

score: 0
Accepted
time: 159ms
memory: 6308kb

input:

1
199604 99546
176159 191086
138429 181944
67569 198623
35297 177657
22993 62162
68546 193414
100380 161830
112597 133247
114577 121122
80178 84189
17707 42100
211 56675
18930 116076
170214 176911
88756 115840
85121 93430
1538 194211
5297 194826
12331 139371
98205 110997
3333 56340
11700 96402
45656...

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 (1 test case)

Test #31:

score: 0
Accepted
time: 187ms
memory: 6128kb

input:

1
199489 99617
23664 52627
108617 138959
4229 100223
176064 196597
143559 163730
103535 151443
53554 196500
105472 158006
154506 190393
6693 54536
26379 105288
121437 171819
105401 197780
38110 152169
129376 134448
193185 199074
42992 61557
8706 29384
296 109525
55956 97934
40004 43964
88870 178390
...

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 (1 test case)

Test #32:

score: 0
Accepted
time: 203ms
memory: 6204kb

input:

1
199705 99899
113902 138967
68937 86292
147460 190982
79047 160599
98906 168949
42987 184473
62758 124862
4375 43060
26883 73218
110548 143921
37414 51392
94630 101673
87850 122341
153060 187310
3981 89322
76857 177304
41266 79671
11196 188361
59146 125009
93905 191774
33636 74651
114150 156609
141...

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 (1 test case)

Test #33:

score: 0
Accepted
time: 216ms
memory: 6128kb

input:

1
199352 99733
37917 173133
73254 154287
2180 130392
53939 184382
95721 125269
18990 93274
175898 182797
24516 148454
164014 182201
56926 133290
39103 102519
77598 126847
35976 105611
101372 185172
24212 41991
28068 62504
44141 145704
38850 144703
5078 190440
37230 88435
90584 149922
601 191977
7793...

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 (1 test case)

Test #34:

score: 0
Accepted
time: 219ms
memory: 6192kb

input:

1
199338 99971
17165 87851
23818 121851
4100 166900
91756 190077
78693 113537
14532 180577
11424 48656
40803 117414
32918 34131
122396 186203
134844 185967
79253 153593
116943 178384
7639 9185
132251 134894
88424 118015
168090 177027
187304 198306
49999 50358
97318 159339
16055 130932
145439 171551
...

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 (1 test case)

Test #35:

score: 0
Accepted
time: 167ms
memory: 6204kb

input:

1
199439 99823
81809 140926
23811 147090
191848 197185
132851 198467
66372 148259
64416 183635
74793 174015
75536 109314
28933 41402
69571 183777
125547 157788
23864 130276
66590 149298
85462 129801
122032 128546
18807 166479
155391 195550
31785 66555
133607 186674
2581 56107
60668 187154
80341 1213...

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 (1 test case)

Test #36:

score: 0
Accepted
time: 148ms
memory: 5044kb

input:

2
99794 49897
8477 62498
65109 96477
42995 72444
28517 55936
67876 87225
20851 53210
53382 82592
40295 71977
27761 47307
37822 82660
19497 42096
3437 26217
31268 47871
85339 98140
64736 97501
20135 40750
3912 44208
22007 33971
31186 63013
18250 43277
39789 56149
56163 62346
54231 92269
88417 90929
5...

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 (2 test cases)

Test #37:

score: 0
Accepted
time: 199ms
memory: 4664kb

input:

3
66379 33189
5835 24165
19013 36047
30577 60062
11987 54246
38178 42807
22994 43449
28778 34300
30361 52843
28455 48046
900 6313
46437 47397
49432 55850
12602 41914
15221 65055
19672 20399
10357 64969
42367 62359
35447 61268
12946 47406
27260 40030
8484 15954
19705 39317
47257 47284
5051 57992
4915...

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 (3 test cases)

Test #38:

score: 0
Accepted
time: 152ms
memory: 4276kb

input:

5
39514 19757
20458 28522
9917 17067
12908 15800
2845 4335
1704 33971
6247 7629
8075 18756
5525 37316
3627 27109
19324 33336
37991 38073
1914 16272
5429 14867
14743 28082
15639 17009
21773 31519
14282 23955
22555 33113
285 34627
23239 34179
6626 18400
7685 12193
23764 26880
10510 18607
8649 16792
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 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 (5 test cases)

Test #39:

score: 0
Accepted
time: 159ms
memory: 4216kb

input:

10
20098 10049
1332 9929
8348 16079
808 19476
577 19504
3976 17301
4195 15617
800 15096
1019 17128
13858 15961
1881 14465
278 4823
27 10577
18474 18645
6748 9234
4185 4551
8192 16755
2268 5542
4444 10026
13412 18514
2812 9565
15843 16720
13137 18526
1693 9391
8464 14783
1660 10294
8725 16273
2247 14...

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 (10 test cases)

Test #40:

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

input:

20
10036 5018
9524 9978
881 7972
5874 9777
497 3608
1863 2806
4961 7511
4658 7600
3147 5840
5094 6027
5128 7282
160 6636
3363 7901
2537 9233
5573 5935
1301 9675
1826 5759
7871 9773
2156 3439
785 9043
4659 4795
2645 7779
1214 9464
4806 10015
3945 7258
3803 6147
1117 5744
4040 8735
4625 8249
2209 6769...

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 (20 test cases)

Test #41:

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

input:

50
4025 2012
1477 1545
503 648
387 3828
1927 3525
256 461
3276 3977
649 798
1698 1983
3 1101
2051 2223
3760 3828
3030 3686
2700 3054
575 1587
1010 2434
213 2977
46 3639
1193 3022
2649 3233
772 2064
901 3288
1319 2699
877 1348
2408 3698
192 545
214 3568
3809 4013
1188 1829
1994 3697
1930 2736
1511 35...

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 (50 test cases)

Test #42:

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

input:

100
1980 990
985 1741
981 1754
531 1058
995 1488
375 1042
26 874
1031 1659
667 1619
1673 1898
974 1830
116 1044
11 926
272 1267
516 784
717 824
107 1978
437 981
1148 1351
298 708
1226 1293
1268 1932
945 1571
1002 1229
70 1066
511 1868
584 1221
1504 1812
1158 1796
562 774
587 1026
1773 1926
426 595
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 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 (100 test cases)

Test #43:

score: 0
Accepted
time: 199ms
memory: 3824kb

input:

200
988 494
682 908
368 485
227 596
311 808
354 763
354 953
664 848
674 734
730 897
76 733
366 968
313 666
311 700
132 567
268 766
180 806
622 712
442 966
1 664
709 739
291 943
672 906
230 290
200 934
40 84
534 675
147 701
425 656
638 795
955 973
267 900
254 747
463 737
234 742
600 805
57 606
65 562...

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 (200 test cases)

Test #44:

score: 0
Accepted
time: 84ms
memory: 3860kb

input:

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

output:

-1
-1
1 2 3 4 5 6 1000000000 8 9 10 11 12 13 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000
1 2 3 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000...

result:

ok ok (5599 test cases)

Test #45:

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

input:

3304
72 15
38 71
34 52
5 54
26 26
49 49
30 66
66 66
9 9
60 60
1 39
64 64
42 49
19 67
61 61
65 65
13 13
54 54
4 4
42 42
68 68
12 12
27 56
64 65
61 71
37 37
70 70
57 57
23 48
1 50
40 40
52 10
46 46
45 45
12 21
18 18
16 16
37 44
15 15
3 37
39 39
4 31
26 26
40 40
22 22
26 30
41 50
2 50
8 18
11 11
5 20
6...

output:

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

result:

ok ok (3304 test cases)

Test #46:

score: 0
Accepted
time: 59ms
memory: 5892kb

input:

781
150 60
4 130
28 91
57 97
1 150
8 24
24 126
94 94
37 65
134 134
107 107
79 147
68 68
97 97
50 50
21 104
136 136
81 81
74 137
114 114
53 53
16 16
105 132
112 112
9 24
109 109
15 15
101 101
132 132
115 115
81 93
73 75
26 132
71 133
12 12
75 75
1 47
4 4
93 93
99 99
54 103
54 54
102 150
35 136
91 91
...

output:

-1
-1
1 1000000000 3 4 5 6 7 8 9 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 100...

result:

ok ok (781 test cases)

Test #47:

score: 0
Accepted
time: 92ms
memory: 3876kb

input:

735
90 62
39 76
56 77
9 9
11 57
3 72
55 89
36 50
24 63
19 34
27 64
19 19
46 48
43 43
61 61
7 87
77 77
63 63
21 75
22 44
4 4
23 32
25 25
47 47
68 89
2 24
53 53
6 6
1 38
49 89
73 73
50 50
71 74
88 88
84 84
22 22
78 78
36 63
38 90
26 48
35 57
23 34
23 63
21 73
70 70
2 2
46 46
72 72
83 83
60 60
18 18
30...

output:

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

result:

ok ok (735 test cases)

Test #48:

score: 0
Accepted
time: 52ms
memory: 3848kb

input:

777
140 5
55 104
89 118
41 41
89 120
103 120
15 15
118 128
8 8
91 91
100 100
311 190
197 197
259 259
61 283
243 243
230 230
184 207
160 160
157 173
55 55
307 307
31 31
68 68
72 72
92 246
6 6
15 255
281 281
231 231
279 279
77 77
52 52
211 211
129 129
80 80
184 213
131 182
70 70
248 248
38 111
180 180...

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

result:

ok ok (777 test cases)

Test #49:

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

input:

385
885 358
589 589
399 767
363 363
295 683
134 134
395 395
404 411
658 658
56 880
384 384
419 747
186 186
41 41
277 277
137 137
349 349
467 467
35 304
638 817
274 274
724 724
153 710
214 317
186 450
60 60
104 153
475 475
93 823
257 401
593 825
176 869
649 818
557 557
34 34
530 814
79 79
395 639
216...

output:

1 2 3 4 5 6 7 8 9 10 11 12 13 1000000000 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 ...

result:

ok ok (385 test cases)

Test #50:

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

input:

77
67 49
16 16
54 54
45 45
23 23
11 46
49 49
9 52
63 63
2 11
11 38
39 39
14 49
26 32
1 1
14 37
9 28
29 29
46 46
34 38
10 50
3 53
20 20
16 64
8 8
53 53
12 36
36 41
46 47
23 63
46 61
34 46
32 32
30 33
57 57
7 23
57 65
20 26
66 66
47 49
25 25
43 54
37 37
28 31
58 58
15 28
51 51
9 43
17 17
25 45
1 51
12...

output:

1 1000000000 3 4 5 6 7 8 9 10 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 100000...

result:

ok ok (77 test cases)

Test #51:

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

input:

42
4196 2994
2492 2492
390 2511
1498 2024
2164 2164
2161 3537
421 421
1680 1680
2484 2484
830 830
714 714
468 468
3662 3662
3181 3181
2192 3103
2433 2433
2284 2284
1074 3167
1431 2085
149 1169
3311 3625
3537 3642
303 375
3440 3440
2304 2304
3169 3169
1408 1654
1298 3334
590 3149
1181 2797
3244 3244
...

output:

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

result:

ok ok (42 test cases)

Test #52:

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

input:

8
41132 33063
5727 6723
16545 18518
7000 23858
21316 34695
4680 13234
1682 18038
9800 23791
39338 39338
16193 16193
1219 11844
10294 25003
718 11746
23967 31763
19416 19416
15762 29909
29565 37798
27394 27394
16073 16073
5862 5862
14541 14541
10027 24193
215 367
19677 19677
998 24535
9587 9587
11322...

output:

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

result:

ok ok (8 test cases)