QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#69682#2353. Maharajas are Going HomeGuanYunchangRE 64ms3676kbC++202.2kb2022-12-30 14:08:142022-12-30 14:08:15

詳細信息

Test #1:

score: 100
Accepted
time: 34ms
memory: 3676kb

input:

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

output:

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

result:

ok 3 lines

Test #2:

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

input:

1
1
1 1

output:

-1 -1 -1

result:

ok single line: '-1 -1 -1'

Test #3:

score: 0
Accepted
time: 34ms
memory: 3604kb

input:

100
1
5 5
1
1 5
1
5 4
1
4 4
1
2 2
1
5 3
1
4 5
1
2 4
1
4 1
1
3 2
1
3 2
1
1 4
1
2 5
1
4 2
1
5 3
1
5 5
1
4 2
1
3 4
1
3 4
1
4 2
1
3 1
1
1 5
1
1 4
1
4 1
1
4 5
1
2 5
1
5 1
1
4 1
1
2 4
1
2 5
1
3 4
1
2 5
1
5 4
1
4 4
1
2 3
1
3 4
1
5 4
1
1 3
1
3 4
1
1 5
1
5 1
1
2 3
1
3 1
1
1 1
1
5 2
1
2 5
1
1 4
1
3 3
1
4 3
1
...

output:

1 1 1
1 1 1
1 2 4
1 1 1
1 1 1
1 4 2
1 2 4
-1 -1 -1
1 1 1
1 1 1
1 1 1
1 1 1
1 2 4
-1 -1 -1
1 4 2
1 1 1
-1 -1 -1
1 2 4
1 2 4
-1 -1 -1
1 1 1
1 1 1
1 1 1
1 1 1
1 2 4
1 2 4
1 1 1
1 1 1
-1 -1 -1
1 2 4
1 2 4
1 2 4
1 2 4
1 1 1
1 1 1
1 2 4
1 2 4
1 1 1
1 2 4
1 1 1
1 1 1
1 1 1
1 1 1
-1 -1 -1
1 4 2
1 2 4
1 1 1
...

result:

ok 100 lines

Test #4:

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

input:

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

output:

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

result:

ok 100 lines

Test #5:

score: 0
Accepted
time: 62ms
memory: 3552kb

input:

100
2
100 100
87 49
2
38 68
61 81
2
41 26
82 40
2
15 92
26 90
2
87 50
76 15
2
41 85
57 30
2
52 7
73 19
2
78 15
95 71
2
51 72
5 34
2
20 83
74 1
2
63 42
74 75
2
97 96
35 72
2
17 84
98 52
2
84 37
50 5
2
55 26
62 4
2
67 13
45 64
2
11 93
45 58
2
39 9
64 26
2
49 17
40 18
2
38 51
34 2
2
30 6
50 60
2
19 24
...

output:

1 91 91
2 30 50
2 27 40
2 10 74
1 56 50
1 20 64
2 51 19
2 23 71
1 12 33
1 7 70
1 29 42
1 86 85
2 64 52
1 28 37
1 49 20
2 18 64
1 2 84
2 45 7
1 41 17
1 38 20
1 30 5
1 19 22
1 10 42
1 9 11
1 32 84
2 42 43
1 19 14
1 24 35
1 5 4
2 57 55
1 51 3
2 75 25
1 10 64
1 14 30
1 32 29
2 1 45
1 18 65
2 12 46
1 49 ...

result:

ok 100 lines

Test #6:

score: 0
Accepted
time: 64ms
memory: 3596kb

input:

100
3
200 200
131 95
32 174
3
90 177
120 177
83 162
3
139 197
56 14
151 88
3
168 34
1 13
179 181
3
119 15
123 165
132 113
3
80 198
150 34
183 118
3
15 185
187 103
6 15
3
193 42
99 155
88 9
3
1 20
19 118
130 121
3
167 54
37 116
27 84
3
8 163
136 50
96 43
3
194 145
58 50
162 188
3
169 181
192 43
167 2...

output:

1 15 15
2 20 77
1 75 133
1 166 34
2 9 51
1 19 198
1 15 47
1 126 42
3 22 121
1 52 54
1 8 29
1 60 11
1 98 110
1 88 19
3 13 112
1 29 91
1 14 4
1 4 84
1 11 58
1 55 109
2 114 112
1 10 117
2 52 15
1 4 23
1 17 75
1 39 2
1 4 185
1 64 47
1 13 145
1 66 33
1 16 55
1 137 53
1 32 9
1 146 11
3 120 69
2 48 46
3 9 ...

result:

ok 100 lines

Test #7:

score: -100
Runtime Error

input:

100
5
500 500
412 315
268 386
7 71
293 234
5
89 405
380 251
212 313
319 289
424 1
5
28 410
110 148
413 360
185 118
192 330
5
284 167
405 475
386 175
131 486
498 235
5
426 10
287 434
435 348
61 183
30 483
5
417 81
433 143
297 150
100 72
368 183
5
257 315
382 288
380 131
426 174
140 5
5
377 418
103 10...

output:


result: