QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#677405#216. Sonda [A]yellowbird10 ✓8ms5596kbC++202.5kb2024-10-26 11:50:532024-10-26 11:50:54

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 1
Accepted

Test #1:

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

input:

3 2 1
1 2
1 3

output:

OK, 12 wywolan MoveProbe()

result:

ok 

Test #2:

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

input:

3 2 1
1 3
2 3

output:

OK, 21 wywolan MoveProbe()

result:

ok 

Test #3:

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

input:

3 2 1
1 2
2 3

output:

OK, 18 wywolan MoveProbe()

result:

ok 

Test #4:

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

input:

4 4 1
1 3
1 4
2 3
2 4

output:

OK, 34 wywolan MoveProbe()

result:

ok 

Test #5:

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

input:

4 4 1
1 2
1 3
2 4
3 4

output:

OK, 30 wywolan MoveProbe()

result:

ok 

Test #6:

score: 1
Accepted
time: 1ms
memory: 3980kb

input:

85 1734 1
1 3
1 4
1 5
1 6
1 7
1 10
1 11
1 14
1 15
1 16
1 18
1 20
1 21
1 22
1 23
1 26
1 28
1 29
1 31
1 32
1 34
1 35
1 36
1 37
1 40
1 41
1 42
1 45
1 46
1 48
1 49
1 51
1 52
1 53
1 55
1 56
1 58
1 59
1 60
1 61
1 63
1 65
1 66
1 68
1 69
1 70
1 76
1 77
1 78
1 81
1 82
2 3
2 4
2 5
2 6
2 7
2 10
2 11
2 14
2 15
...

output:

OK, 1239 wywolan MoveProbe()

result:

ok 

Test #7:

score: 1
Accepted
time: 1ms
memory: 3976kb

input:

101 2044 1
1 74
1 75
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 83
1 84
1 85
1 86
1 87
1 88
1 89
1 90
1 91
1 92
1 93
1 94
1 95
1 96
1 97
1 98
1 99
1 100
1 101
2 74
2 75
2 76
2 77
2 78
2 79
2 80
2 81
2 82
2 83
2 84
2 85
2 86
2 87
2 88
2 89
2 90
2 91
2 92
2 93
2 94
2 95
2 96
2 97
2 98
2 99
2 100
2 101
3 74
...

output:

OK, 25206 wywolan MoveProbe()

result:

ok 

Test #8:

score: 1
Accepted
time: 1ms
memory: 4284kb

input:

181 7684 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
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 ...

output:

OK, 7709 wywolan MoveProbe()

result:

ok 

Test #9:

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

input:

400 34671 1
1 2
1 4
1 6
1 8
1 10
1 12
1 14
1 16
1 18
1 20
1 22
1 24
1 26
1 28
1 30
1 32
1 34
1 36
1 38
1 40
1 42
1 44
1 46
1 48
1 50
1 52
1 54
1 56
1 58
1 60
1 62
1 64
1 66
1 68
1 70
1 72
1 74
1 76
1 78
1 80
1 82
1 84
1 86
1 88
1 90
1 92
1 94
1 96
1 98
1 100
1 102
1 104
1 106
1 108
1 110
1 112
1 114...

output:

OK, 13529 wywolan MoveProbe()

result:

ok 

Test #10:

score: 1
Accepted
time: 4ms
memory: 5164kb

input:

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

output:

OK, 593207 wywolan MoveProbe()

result:

ok 

Test #11:

score: 1
Accepted
time: 2ms
memory: 5484kb

input:

400 399 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
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 6...

output:

OK, 160797 wywolan MoveProbe()

result:

ok 

Test #12:

score: 1
Accepted
time: 4ms
memory: 5232kb

input:

400 40000 1
1 2
1 4
1 6
1 8
1 10
1 12
1 14
1 16
1 18
1 20
1 22
1 24
1 26
1 28
1 30
1 32
1 34
1 36
1 38
1 40
1 42
1 44
1 46
1 48
1 50
1 52
1 54
1 56
1 58
1 60
1 62
1 64
1 66
1 68
1 70
1 72
1 74
1 76
1 78
1 80
1 82
1 84
1 86
1 88
1 90
1 92
1 94
1 96
1 98
1 100
1 102
1 104
1 106
1 108
1 110
1 112
1 114...

output:

OK, 2798 wywolan MoveProbe()

result:

ok 

Test #13:

score: 1
Accepted
time: 1ms
memory: 5228kb

input:

400 1191 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
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 ...

output:

OK, 81201 wywolan MoveProbe()

result:

ok 

Test #14:

score: 1
Accepted
time: 2ms
memory: 5212kb

input:

400 3900 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
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 60
1 61
1 ...

output:

OK, 77255 wywolan MoveProbe()

result:

ok 

Test #15:

score: 1
Accepted
time: 2ms
memory: 5300kb

input:

400 15036 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 27
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 61
1 62
1 63
1...

output:

OK, 59767 wywolan MoveProbe()

result:

ok 

Test #16:

score: 1
Accepted
time: 3ms
memory: 5476kb

input:

400 28975 1
1 2
1 5
1 6
1 10
1 11
1 12
1 13
1 14
1 15
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 28
1 29
1 30
1 31
1 32
1 33
1 35
1 37
1 38
1 40
1 41
1 42
1 43
1 45
1 46
1 47
1 48
1 49
1 51
1 52
1 55
1 57
1 58
1 59
1 60
1 62
1 63
1 65
1 66
1 67
1 68
1 69
1 71
1 72
1 74
1 75
1 77
1 78
1 79
1...

output:

OK, 34677 wywolan MoveProbe()

result:

ok 

Test #17:

score: 1
Accepted
time: 4ms
memory: 5524kb

input:

400 39271 1
1 2
1 3
1 4
1 6
1 7
1 8
1 12
1 14
1 17
1 18
1 21
1 22
1 25
1 27
1 30
1 32
1 33
1 35
1 37
1 38
1 39
1 41
1 42
1 43
1 45
1 46
1 47
1 50
1 51
1 52
1 54
1 55
1 58
1 59
1 60
1 62
1 68
1 70
1 71
1 74
1 75
1 77
1 80
1 82
1 83
1 85
1 86
1 87
1 89
1 90
1 93
1 94
1 95
1 96
1 102
1 103
1 104
1 108
...

output:

OK, 8613 wywolan MoveProbe()

result:

ok 

Test #18:

score: 1
Accepted
time: 5ms
memory: 5528kb

input:

400 36519 1
1 5
1 13
1 24
1 26
1 29
1 30
1 32
1 34
1 35
1 38
1 39
1 40
1 42
1 47
1 53
1 54
1 58
1 60
1 61
1 63
1 65
1 76
1 80
1 82
1 84
1 85
1 86
1 92
1 96
1 101
1 103
1 106
1 107
1 112
1 113
1 115
1 118
1 121
1 127
1 128
1 131
1 135
1 137
1 146
1 147
1 148
1 149
1 150
1 152
1 153
1 156
1 160
1 161
...

output:

OK, 97151 wywolan MoveProbe()

result:

ok 

Test #19:

score: 1
Accepted
time: 4ms
memory: 5300kb

input:

400 9024 1
1 34
1 39
1 43
1 54
1 57
1 65
1 83
1 93
1 99
1 108
1 110
1 153
1 172
1 200
1 205
1 212
1 245
1 246
1 254
1 263
1 326
1 335
1 354
1 363
2 34
2 39
2 43
2 54
2 57
2 65
2 83
2 93
2 99
2 108
2 110
2 153
2 172
2 200
2 205
2 212
2 245
2 246
2 254
2 263
2 326
2 335
2 354
2 363
3 34
3 39
3 43
3 54...

output:

OK, 394022 wywolan MoveProbe()

result:

ok 

Test #20:

score: 1
Accepted
time: 3ms
memory: 5160kb

input:

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

output:

OK, 505918 wywolan MoveProbe()

result:

ok 

Subtask #2:

score: 1
Accepted

Test #21:

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

input:

3 3 2
2 1
1 3
2 3

output:

OK, 12 wywolan MoveProbe()

result:

ok 

Test #22:

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

input:

4 4 2
1 2
2 3
1 3
4 1

output:

OK, 23 wywolan MoveProbe()

result:

ok 

Test #23:

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

input:

4 4 2
1 2
2 3
1 3
4 3

output:

OK, 23 wywolan MoveProbe()

result:

ok 

Test #24:

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

input:

4 4 2
1 2
2 3
1 3
4 2

output:

OK, 20 wywolan MoveProbe()

result:

ok 

Test #25:

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

input:

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

output:

OK, 32 wywolan MoveProbe()

result:

ok 

Test #26:

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

input:

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

output:

OK, 228 wywolan MoveProbe()

result:

ok 

Test #27:

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

input:

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

output:

OK, 213 wywolan MoveProbe()

result:

ok 

Test #28:

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

input:

40 734 2
1 2
2 3
1 3
1 4
1 5
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
1 29
1 30
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
2 4
2 5
2 6
2 7
2 8
2 9
2 10
2 12
2 13
2 14
2 15
2 16
2 17
2 19
2 20
2 21
2 22
2 23
2 24
2 25
2 26
2 27
2 28
...

output:

OK, 402 wywolan MoveProbe()

result:

ok 

Test #29:

score: 1
Accepted
time: 1ms
memory: 4252kb

input:

71 1035 2
1 2
2 3
1 3
1 11
1 12
1 14
1 17
1 18
1 21
1 24
1 26
1 28
1 29
1 31
1 34
1 37
1 38
1 43
1 44
1 46
1 47
1 49
1 52
1 53
1 59
1 60
1 61
1 62
1 63
1 64
1 68
1 69
2 5
2 7
2 8
2 15
2 17
2 24
2 25
2 29
2 38
2 42
2 46
2 48
2 51
2 53
2 55
2 56
2 57
2 61
2 62
2 63
2 64
2 66
2 71
3 4
3 6
3 7
3 8
3 9
3...

output:

OK, 814 wywolan MoveProbe()

result:

ok 

Test #30:

score: 1
Accepted
time: 1ms
memory: 4532kb

input:

238 355 2
3 2
1 2
1 3
77 155
2 155
2 77
30 235
155 235
155 30
110 104
235 104
235 110
234 130
104 130
104 234
82 101
130 101
130 82
129 50
101 50
101 129
47 83
50 83
50 47
64 8
83 8
83 64
116 159
8 159
8 116
25 185
159 185
159 25
14 144
185 144
185 14
197 127
144 127
144 197
152 206
127 206
127 152
...

output:

OK, 46289 wywolan MoveProbe()

result:

ok 

Test #31:

score: 1
Accepted
time: 1ms
memory: 5004kb

input:

333 2798 2
141 322
317 322
317 141
166 322
166 141
166 317
114 322
114 141
114 317
114 166
85 322
85 141
85 317
85 166
85 114
58 322
58 141
58 317
58 166
58 114
58 85
88 322
88 141
88 317
88 166
88 114
88 85
88 58
153 322
153 141
153 317
153 166
153 114
153 85
153 58
153 88
53 322
53 141
53 317
53 1...

output:

OK, 46034 wywolan MoveProbe()

result:

ok 

Test #32:

score: 1
Accepted
time: 3ms
memory: 5564kb

input:

400 79800 2
242 106
214 106
214 242
230 106
230 242
230 214
337 106
337 242
337 214
337 230
83 106
83 242
83 214
83 230
83 337
192 106
192 242
192 214
192 230
192 337
192 83
262 106
262 242
262 214
262 230
262 337
262 83
262 192
279 106
279 242
279 214
279 230
279 337
279 83
279 192
279 262
164 106
...

output:

OK, 4379 wywolan MoveProbe()

result:

ok 

Test #33:

score: 1
Accepted
time: 8ms
memory: 5596kb

input:

400 79402 2
45 104
317 104
317 45
400 104
400 45
400 317
383 104
383 45
383 317
383 400
156 104
156 45
156 317
156 400
156 383
302 104
302 45
302 317
302 400
302 383
302 156
68 104
68 45
68 317
68 400
68 383
68 156
68 302
199 104
199 45
199 317
199 400
199 383
199 156
199 302
199 68
387 104
387 45
3...

output:

OK, 6181 wywolan MoveProbe()

result:

ok 

Test #34:

score: 1
Accepted
time: 2ms
memory: 5468kb

input:

400 433 2
1 2
2 3
1 3
3 249
249 276
276 309
309 160
160 250
250 24
250 350
250 42
24 27
27 247
247 287
287 135
287 348
350 296
287 121
296 43
121 188
121 81
81 306
43 275
121 203
81 271
203 279
275 305
135 189
306 284
189 180
189 70
188 399
399 38
399 253
70 159
253 396
396 217
217 87
253 378
296 23...

output:

OK, 234468 wywolan MoveProbe()

result:

ok 

Test #35:

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

input:

400 407 2
1 2
2 3
1 3
1 158
1 169
2 295
1 359
3 333
3 88
3 138
1 293
1 348
1 320
1 172
158 124
1 134
1 298
1 52
158 269
1 173
1 177
298 336
3 283
1 80
359 181
1 175
158 204
359 151
158 294
169 64
3 239
3 31
1 369
158 264
1 156
1 273
1 388
2 104
298 221
239 187
1 372
173 29
2 243
3 27
138 36
124 73
3...

output:

OK, 279818 wywolan MoveProbe()

result:

ok 

Test #36:

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

input:

400 1103 2
1 3
3 2
1 2
3 274
1 101
1 47
1 30
1 40
1 246
1 201
1 311
1 368
1 142
1 157
1 255
1 31
1 12
1 221
1 399
1 364
3 53
3 123
1 391
1 88
1 243
1 362
1 320
1 80
2 379
1 76
311 303
1 109
1 172
274 277
1 381
1 57
3 165
1 321
1 164
1 78
1 349
30 336
1 269
1 215
1 168
2 162
1 188
1 298
1 90
2 237
1 ...

output:

OK, 374392 wywolan MoveProbe()

result:

ok 

Test #37:

score: 1
Accepted
time: 2ms
memory: 5496kb

input:

400 401 2
3 1
1 2
3 2
2 320
320 29
29 351
351 386
386 237
237 183
183 138
138 211
211 103
103 258
103 132
132 43
43 98
43 331
331 139
139 174
174 107
107 259
259 270
270 133
133 261
261 315
315 184
315 31
184 118
118 340
340 230
230 153
153 112
230 164
112 334
230 99
99 240
99 189
189 33
33 179
33 6...

output:

OK, 238375 wywolan MoveProbe()

result:

ok 

Test #38:

score: 1
Accepted
time: 2ms
memory: 5516kb

input:

400 1424 2
2 1
1 3
2 3
3 313
313 237
237 351
351 192
192 77
77 346
346 399
399 295
295 281
281 122
122 75
75 215
215 311
311 207
207 94
94 63
94 222
222 168
168 25
25 22
22 377
377 170
170 158
158 41
41 33
33 8
8 297
297 235
235 15
15 45
45 12
12 169
169 242
242 37
37 378
378 217
37 251
251 11
11 89...

output:

OK, 160337 wywolan MoveProbe()

result:

ok 

Test #39:

score: 1
Accepted
time: 2ms
memory: 5160kb

input:

400 400 2
3 1
1 2
3 2
3 279
1 313
3 10
2 89
2 354
354 134
1 90
313 130
3 235
3 286
313 182
3 357
10 54
1 123
1 79
130 202
1 271
130 382
1 305
313 217
3 124
217 373
3 84
202 380
134 209
2 4
1 272
3 180
354 164
313 302
134 301
2 213
54 223
209 63
235 194
313 12
182 233
79 117
279 185
1 299
279 330
354...

output:

OK, 273788 wywolan MoveProbe()

result:

ok 

Test #40:

score: 1
Accepted
time: 7ms
memory: 5284kb

input:

400 78998 2
1 2
2 3
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
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
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 ...

output:

OK, 4308 wywolan MoveProbe()

result:

ok 

Subtask #3:

score: 1
Accepted

Test #41:

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

input:

3 3 3
1 2
2 3
3 1

output:

OK, 12 wywolan MoveProbe()

result:

ok 

Test #42:

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

input:

4 4 3
1 2
2 3
3 4
4 1

output:

OK, 24 wywolan MoveProbe()

result:

ok 

Test #43:

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

input:

4 4 3
2 4
4 3
3 1
1 2

output:

OK, 30 wywolan MoveProbe()

result:

ok 

Test #44:

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

input:

4 4 3
3 1
1 4
4 2
2 3

output:

OK, 34 wywolan MoveProbe()

result:

ok 

Test #45:

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

input:

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

output:

OK, 49 wywolan MoveProbe()

result:

ok 

Test #46:

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

input:

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

output:

OK, 54 wywolan MoveProbe()

result:

ok 

Test #47:

score: 1
Accepted
time: 1ms
memory: 4040kb

input:

72 72 3
50 64
64 68
68 28
28 66
66 38
38 54
54 39
39 71
71 70
70 19
19 32
32 24
24 2
2 3
3 43
43 14
14 35
35 58
58 12
12 37
37 16
16 46
46 8
8 26
26 29
29 59
59 11
11 4
4 21
21 33
33 60
60 61
61 1
1 22
22 48
48 7
7 57
57 17
17 62
62 41
41 15
15 27
27 18
18 51
51 53
53 30
30 65
65 45
45 20
20 6
6 36
...

output:

OK, 6478 wywolan MoveProbe()

result:

ok 

Test #48:

score: 1
Accepted
time: 1ms
memory: 4320kb

input:

115 115 3
64 101
101 15
15 25
25 109
109 9
9 84
84 44
44 108
108 77
77 90
90 96
96 60
60 41
41 53
53 33
33 82
82 74
74 27
27 83
83 36
36 49
49 50
50 92
92 88
88 20
20 8
8 63
63 38
38 16
16 24
24 93
93 104
104 113
113 61
61 80
80 70
70 100
100 42
42 102
102 75
75 94
94 23
23 98
98 3
3 13
13 78
78 86
...

output:

OK, 12946 wywolan MoveProbe()

result:

ok 

Test #49:

score: 1
Accepted
time: 1ms
memory: 4192kb

input:

143 143 3
143 1
1 142
142 2
2 3
3 4
4 5
5 6
6 7
7 8
8 141
141 9
9 140
140 10
10 139
139 138
138 11
11 12
12 137
137 13
13 136
136 135
135 14
14 134
134 133
133 132
132 131
131 15
15 130
130 129
129 128
128 16
16 127
127 17
17 18
18 19
19 20
20 21
21 126
126 22
22 125
125 124
124 123
123 122
122 121
...

output:

OK, 17401 wywolan MoveProbe()

result:

ok 

Test #50:

score: 1
Accepted
time: 1ms
memory: 4540kb

input:

238 238 3
1 238
238 2
2 237
237 3
3 236
236 4
4 235
235 5
5 234
234 6
6 233
233 7
7 232
232 8
8 231
231 9
9 230
230 10
10 229
229 11
11 228
228 12
12 227
227 13
13 226
226 14
14 225
225 15
15 224
224 16
16 223
223 17
17 222
222 18
18 221
221 19
19 220
220 20
20 219
219 21
21 218
218 22
22 217
217 23...

output:

OK, 78661 wywolan MoveProbe()

result:

ok 

Test #51:

score: 1
Accepted
time: 1ms
memory: 4828kb

input:

325 325 3
45 142
142 5
5 18
18 111
111 168
168 166
166 160
160 181
181 11
11 44
44 9
9 29
29 141
141 39
39 130
130 134
134 21
21 13
13 23
23 61
61 10
10 51
51 56
56 87
87 37
37 72
72 65
65 20
20 77
77 185
185 3
3 60
60 26
26 195
195 24
24 35
35 12
12 48
48 69
69 105
105 109
109 118
118 93
93 263
263...

output:

OK, 100113 wywolan MoveProbe()

result:

ok 

Test #52:

score: 1
Accepted
time: 2ms
memory: 5236kb

input:

399 399 3
186 93
93 301
301 388
388 383
383 316
316 260
260 377
377 350
350 333
333 264
264 353
353 304
304 303
303 298
298 372
372 222
222 44
44 252
252 282
282 268
268 393
393 296
296 338
338 360
360 386
386 267
267 382
382 137
137 397
397 87
87 381
381 385
385 374
374 356
356 71
71 398
398 287
28...

output:

OK, 216141 wywolan MoveProbe()

result:

ok 

Test #53:

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

input:

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

output:

OK, 3188 wywolan MoveProbe()

result:

ok 

Test #54:

score: 1
Accepted
time: 2ms
memory: 5240kb

input:

399 399 3
269 316
316 225
225 128
128 15
15 153
153 171
171 378
378 63
63 148
148 179
179 181
181 13
13 379
379 277
277 273
273 266
266 89
89 119
119 239
239 297
297 26
26 104
104 331
331 157
157 105
105 164
164 315
315 391
391 154
154 300
300 350
350 17
17 265
265 302
302 4
4 234
234 30
30 386
386 ...

output:

OK, 146969 wywolan MoveProbe()

result:

ok 

Test #55:

score: 1
Accepted
time: 2ms
memory: 5188kb

input:

399 399 3
1 399
399 2
2 3
3 4
4 398
398 397
397 396
396 5
5 395
395 6
6 7
7 8
8 394
394 9
9 393
393 10
10 11
11 392
392 391
391 390
390 12
12 13
13 14
14 15
15 389
389 16
16 388
388 387
387 17
17 386
386 385
385 18
18 19
19 20
20 384
384 383
383 382
382 381
381 380
380 379
379 378
378 377
377 21
21 ...

output:

OK, 181650 wywolan MoveProbe()

result:

ok 

Test #56:

score: 1
Accepted
time: 2ms
memory: 5232kb

input:

399 399 3
1 399
399 2
2 398
398 3
3 397
397 4
4 396
396 5
5 395
395 6
6 394
394 7
7 393
393 8
8 392
392 9
9 391
391 10
10 390
390 11
11 389
389 12
12 388
388 13
13 387
387 14
14 386
386 15
15 385
385 16
16 384
384 17
17 383
383 18
18 382
382 19
19 381
381 20
20 380
380 21
21 379
379 22
22 378
378 23...

output:

OK, 279002 wywolan MoveProbe()

result:

ok 

Test #57:

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

input:

399 399 3
382 383
383 392
392 379
379 398
398 389
389 399
399 396
396 356
356 342
342 368
368 376
376 312
312 308
308 388
388 397
397 330
330 323
323 349
349 233
233 369
369 391
391 395
395 316
316 348
348 335
335 367
367 332
332 272
272 360
360 254
254 394
394 358
358 353
353 370
370 365
365 357
35...

output:

OK, 37906 wywolan MoveProbe()

result:

ok 

Test #58:

score: 1
Accepted
time: 1ms
memory: 5544kb

input:

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

output:

OK, 3195 wywolan MoveProbe()

result:

ok 

Test #59:

score: 1
Accepted
time: 2ms
memory: 5276kb

input:

400 400 3
50 386
386 122
122 127
127 170
170 92
92 321
321 362
362 9
9 111
111 335
335 58
58 183
183 1
1 383
383 35
35 28
28 257
257 238
238 360
360 53
53 291
291 231
231 343
343 69
69 36
36 352
352 245
245 176
176 349
349 165
165 25
25 114
114 353
353 166
166 264
264 357
357 97
97 169
169 233
233 3...

output:

OK, 247639 wywolan MoveProbe()

result:

ok 

Test #60:

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

input:

400 400 3
400 399
399 398
398 397
397 396
396 395
395 1
1 394
394 2
2 393
393 3
3 4
4 392
392 391
391 390
390 5
5 6
6 7
7 389
389 8
8 388
388 387
387 9
9 386
386 10
10 385
385 384
384 11
11 383
383 12
12 13
13 14
14 382
382 15
15 381
381 380
380 379
379 16
16 17
17 18
18 378
378 19
19 20
20 21
21 37...

output:

OK, 291530 wywolan MoveProbe()

result:

ok 

Test #61:

score: 1
Accepted
time: 2ms
memory: 5196kb

input:

400 400 3
1 400
400 2
2 399
399 3
3 398
398 4
4 397
397 5
5 396
396 6
6 395
395 7
7 394
394 8
8 393
393 9
9 392
392 10
10 391
391 11
11 390
390 12
12 389
389 13
13 388
388 14
14 387
387 15
15 386
386 16
16 385
385 17
17 384
384 18
18 383
383 19
19 382
382 20
20 381
381 21
21 380
380 22
22 379
379 23...

output:

OK, 221302 wywolan MoveProbe()

result:

ok 

Test #62:

score: 1
Accepted
time: 1ms
memory: 5244kb

input:

400 400 3
72 115
115 29
29 170
170 101
101 1
1 65
65 8
8 9
9 14
14 176
176 2
2 36
36 93
93 3
3 11
11 31
31 44
44 43
43 39
39 32
32 87
87 24
24 63
63 172
172 26
26 52
52 308
308 5
5 33
33 27
27 4
4 23
23 95
95 83
83 6
6 62
62 61
61 13
13 42
42 30
30 12
12 10
10 20
20 105
105 140
140 119
119 214
214 4...

output:

OK, 47559 wywolan MoveProbe()

result:

ok 

Test #63:

score: 1
Accepted
time: 1ms
memory: 5500kb

input:

400 400 3
399 345
345 199
199 340
340 386
386 336
336 358
358 400
400 363
363 378
378 377
377 397
397 250
250 396
396 324
324 318
318 388
388 384
384 375
375 387
387 300
300 385
385 382
382 348
348 398
398 374
374 380
380 331
331 353
353 365
365 309
309 371
371 327
327 389
389 307
307 284
284 298
29...

output:

OK, 34443 wywolan MoveProbe()

result:

ok 

Subtask #4:

score: 1
Accepted

Test #64:

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

input:

3 2 0
1 2
1 3

output:

OK, 12 wywolan MoveProbe()

result:

ok 

Test #65:

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

input:

3 3 0
1 2
2 3
1 3

output:

OK, 12 wywolan MoveProbe()

result:

ok 

Test #66:

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

input:

4 4 0
1 4
4 3
4 2
3 2

output:

OK, 29 wywolan MoveProbe()

result:

ok 

Test #67:

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

input:

4 6 0
1 3
3 4
3 2
1 2
1 4
4 2

output:

OK, 23 wywolan MoveProbe()

result:

ok 

Test #68:

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

input:

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

output:

OK, 34 wywolan MoveProbe()

result:

ok 

Test #69:

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

input:

5 4 0
1 5
5 3
5 2
2 4

output:

OK, 64 wywolan MoveProbe()

result:

ok 

Test #70:

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

input:

5 9 0
1 5
5 3
3 2
5 4
2 4
1 4
3 4
5 2
1 2

output:

OK, 41 wywolan MoveProbe()

result:

ok 

Test #71:

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

input:

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

output:

OK, 63 wywolan MoveProbe()

result:

ok 

Test #72:

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

input:

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

output:

OK, 91 wywolan MoveProbe()

result:

ok 

Test #73:

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

input:

7 11 0
1 2
1 4
2 4
2 5
2 6
3 4
3 5
3 7
5 6
5 7
6 7

output:

OK, 54 wywolan MoveProbe()

result:

ok 

Test #74:

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

input:

8 22 0
1 2
1 5
1 6
1 8
2 3
2 4
2 5
2 6
2 7
2 8
3 4
3 5
3 6
3 7
4 5
4 6
4 7
4 8
5 6
5 8
6 8
7 8

output:

OK, 72 wywolan MoveProbe()

result:

ok 

Test #75:

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

input:

8 28 0
1 2
1 3
1 4
1 5
1 6
1 7
1 8
2 3
2 4
2 5
2 6
2 7
2 8
3 4
3 5
3 6
3 7
3 8
4 5
4 6
4 7
4 8
5 6
5 7
5 8
6 7
6 8
7 8

output:

OK, 67 wywolan MoveProbe()

result:

ok 

Test #76:

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

input:

9 16 0
1 2
1 3
1 7
2 3
2 5
2 6
2 9
3 5
3 7
4 5
4 9
5 7
5 8
6 8
6 9
7 8

output:

OK, 83 wywolan MoveProbe()

result:

ok 

Test #77:

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

input:

9 15 0
1 4
1 9
9 5
1 7
4 6
4 2
7 8
7 3
9 2
4 5
1 5
5 6
6 2
1 6
1 2

output:

OK, 96 wywolan MoveProbe()

result:

ok 

Test #78:

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

input:

10 28 0
1 2
1 3
1 4
1 7
1 8
1 9
1 10
2 5
2 6
2 7
2 8
2 9
3 4
3 6
3 8
4 6
4 7
4 8
4 9
4 10
5 6
5 7
5 8
5 9
6 7
6 8
7 8
9 10

output:

OK, 96 wywolan MoveProbe()

result:

ok 

Test #79:

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

input:

10 45 0
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
2 3
2 4
2 5
2 6
2 7
2 8
2 9
2 10
3 4
3 5
3 6
3 7
3 8
3 9
3 10
4 5
4 6
4 7
4 8
4 9
4 10
5 6
5 7
5 8
5 9
5 10
6 7
6 8
6 9
6 10
7 8
7 9
7 10
8 9
8 10
9 10

output:

OK, 89 wywolan MoveProbe()

result:

ok 

Test #80:

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

input:

10 44 0
1 5
1 9
5 8
8 4
1 6
1 7
7 10
10 3
9 2
4 7
5 3
4 6
1 3
5 4
8 6
8 7
8 10
5 7
1 8
9 10
6 3
5 2
6 7
6 2
5 10
9 8
7 3
8 3
4 10
3 2
10 2
1 10
5 9
9 4
9 7
4 2
4 3
1 4
5 6
6 10
1 2
9 3
7 2
9 6

output:

OK, 89 wywolan MoveProbe()

result:

ok 

Test #81:

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

input:

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

output:

OK, 147 wywolan MoveProbe()

result:

ok 

Test #82:

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

input:

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

output:

OK, 222 wywolan MoveProbe()

result:

ok 

Test #83:

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

input:

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

output:

OK, 117 wywolan MoveProbe()

result:

ok 

Test #84:

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

input:

10 24 0
1 2
1 3
1 5
1 6
1 7
1 10
2 4
2 8
2 9
3 4
3 8
3 9
4 5
4 6
4 7
4 10
5 8
5 9
6 8
6 9
7 8
7 9
8 10
9 10

output:

OK, 82 wywolan MoveProbe()

result:

ok 

Test #85:

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

input:

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

output:

OK, 315 wywolan MoveProbe()

result:

ok 

Test #86:

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

input:

7 9 0
1 3
1 4
1 6
2 7
3 4
3 5
3 6
4 5
5 7

output:

OK, 67 wywolan MoveProbe()

result:

ok 

Subtask #5:

score: 1
Accepted

Test #87:

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

input:

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

output:

OK, 419 wywolan MoveProbe()

result:

ok 

Test #88:

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

input:

30 431 0
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
1 29
1 30
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
2 29
2 30
3 4
3 5
3 6
3 7
3 8
3...

output:

OK, 301 wywolan MoveProbe()

result:

ok 

Test #89:

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

input:

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

output:

OK, 869 wywolan MoveProbe()

result:

ok 

Test #90:

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

input:

30 29 0
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
1 29
1 30

output:

OK, 957 wywolan MoveProbe()

result:

ok 

Test #91:

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

input:

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

output:

OK, 848 wywolan MoveProbe()

result:

ok 

Test #92:

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

input:

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

output:

OK, 1245 wywolan MoveProbe()

result:

ok 

Test #93:

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

input:

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

output:

OK, 894 wywolan MoveProbe()

result:

ok 

Test #94:

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

input:

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

output:

OK, 929 wywolan MoveProbe()

result:

ok 

Test #95:

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

input:

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

output:

OK, 1504 wywolan MoveProbe()

result:

ok 

Test #96:

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

input:

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

output:

OK, 388 wywolan MoveProbe()

result:

ok 

Test #97:

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

input:

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

output:

OK, 472 wywolan MoveProbe()

result:

ok 

Test #98:

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

input:

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

output:

OK, 1093 wywolan MoveProbe()

result:

ok 

Test #99:

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

input:

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

output:

OK, 235 wywolan MoveProbe()

result:

ok 

Test #100:

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

input:

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

output:

OK, 749 wywolan MoveProbe()

result:

ok 

Test #101:

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

input:

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

output:

OK, 1248 wywolan MoveProbe()

result:

ok 

Test #102:

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

input:

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

output:

OK, 1402 wywolan MoveProbe()

result:

ok 

Test #103:

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

input:

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

output:

OK, 509 wywolan MoveProbe()

result:

ok 

Subtask #6:

score: 1
Accepted

Test #104:

score: 1
Accepted
time: 1ms
memory: 4220kb

input:

80 79 0
1 64
64 41
41 74
74 23
23 49
49 19
19 42
42 27
27 11
11 18
18 45
45 69
69 12
12 31
31 8
8 29
29 57
57 13
13 76
76 38
38 14
14 16
16 51
51 5
5 75
75 46
46 58
58 7
7 61
41 78
13 28
1 54
46 2
29 35
69 73
1 43
13 44
23 77
69 79
27 63
41 24
31 68
7 48
27 60
46 30
18 32
1 21
46 36
69 53
27 10
18 6...

output:

OK, 10798 wywolan MoveProbe()

result:

ok 

Test #105:

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

input:

80 613 0
1 6
1 11
1 20
1 21
1 23
1 31
1 33
1 34
1 39
1 42
1 56
1 61
1 68
1 78
1 80
2 3
2 6
2 10
2 24
2 27
2 28
2 38
2 42
2 43
2 50
2 58
2 62
2 65
2 66
2 68
3 8
3 21
3 22
3 29
3 33
3 36
3 39
3 41
3 42
3 43
3 47
3 48
3 58
3 59
3 62
3 64
3 67
3 73
3 76
3 78
4 13
4 27
4 37
4 46
4 48
4 49
4 52
4 54
4 59
...

output:

OK, 1865 wywolan MoveProbe()

result:

ok 

Test #106:

score: 1
Accepted
time: 1ms
memory: 4272kb

input:

80 3160 0
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
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1 6...

output:

OK, 859 wywolan MoveProbe()

result:

ok 

Test #107:

score: 1
Accepted
time: 1ms
memory: 4000kb

input:

80 1349 0
1 2
1 6
1 7
1 8
1 11
1 12
1 17
1 18
1 21
1 22
1 25
1 26
1 27
1 31
1 32
1 37
1 38
1 39
1 40
1 42
1 47
1 48
1 51
1 53
1 54
1 55
1 57
1 59
1 60
1 72
1 74
1 79
1 80
2 6
2 7
2 11
2 14
2 15
2 17
2 25
2 27
2 31
2 33
2 36
2 38
2 40
2 41
2 42
2 43
2 44
2 45
2 49
2 51
2 53
2 55
2 60
2 61
2 62
2 64
2...

output:

OK, 948 wywolan MoveProbe()

result:

ok 

Test #108:

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

input:

80 165 0
1 31
1 41
1 42
1 64
2 24
2 64
2 66
3 33
3 39
3 46
3 60
4 18
4 23
4 40
4 53
4 71
5 17
5 18
5 40
5 49
5 59
5 66
6 12
6 35
6 58
7 10
7 25
8 17
8 28
8 31
8 50
9 24
9 25
9 43
9 72
10 39
10 47
10 60
10 79
11 73
12 25
12 41
12 66
12 75
13 47
13 58
13 78
14 17
14 41
14 42
14 55
14 67
14 75
15 34
15...

output:

OK, 5113 wywolan MoveProbe()

result:

ok 

Test #109:

score: 1
Accepted
time: 1ms
memory: 3956kb

input:

79 83 0
1 35
35 6
6 14
6 62
14 9
62 34
34 68
68 16
16 10
10 53
53 21
53 2
2 37
37 54
54 30
30 13
13 8
8 47
47 55
8 31
55 27
27 19
27 11
21 74
27 66
19 18
18 77
19 76
76 59
76 22
22 46
46 15
77 36
66 44
46 43
43 40
40 25
25 12
12 24
12 29
29 73
29 58
58 60
58 52
58 79
52 45
52 49
49 61
61 39
79 5
61 ...

output:

OK, 11575 wywolan MoveProbe()

result:

ok 

Test #110:

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

input:

79 89 0
1 7
1 58
1 47
1 11
1 38
1 61
1 62
1 18
1 2
1 72
1 75
1 43
1 13
1 16
1 6
11 19
1 21
1 68
1 28
1 50
7 8
1 5
1 20
7 54
1 4
1 24
7 45
47 74
1 73
58 36
1 32
1 78
1 56
1 69
7 12
1 15
58 52
1 29
1 41
1 3
7 77
1 35
7 53
7 76
58 51
1 70
1 65
61 71
1 79
1 30
1 66
7 42
61 26
75 17
1 23
47 49
1 48
1 31
...

output:

OK, 10532 wywolan MoveProbe()

result:

ok 

Test #111:

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

input:

80 79 0
1 16
16 80
80 32
32 36
36 74
74 69
69 9
9 27
27 7
7 39
39 61
61 10
10 44
44 50
50 18
18 35
35 49
49 60
60 38
38 2
2 41
41 29
29 59
69 71
80 54
10 48
29 72
80 45
80 43
80 52
29 31
35 51
80 77
50 33
39 65
69 55
35 24
2 22
29 37
69 58
60 6
2 57
10 47
27 28
60 21
50 26
36 73
27 13
27 15
50 40
69...

output:

OK, 7456 wywolan MoveProbe()

result:

ok 

Test #112:

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

input:

80 79 0
1 62
62 47
47 72
72 76
76 45
45 35
35 3
3 68
68 28
28 23
23 22
22 80
80 41
41 67
67 12
12 69
69 46
46 15
15 37
37 58
58 30
30 20
20 65
65 38
38 13
13 66
66 6
6 34
34 16
16 31
31 36
36 55
55 39
58 9
55 33
47 51
47 27
66 21
1 74
38 79
47 25
35 2
68 29
58 64
76 5
35 8
58 56
1 63
76 26
58 17
58 ...

output:

OK, 11028 wywolan MoveProbe()

result:

ok 

Test #113:

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

input:

80 178 0
46 41
46 13
46 80
46 34
62 41
62 40
62 76
54 41
54 19
41 12
41 23
41 6
67 13
67 40
67 27
67 75
13 37
13 30
13 9
40 8
40 44
40 55
74 42
74 20
74 49
42 80
42 27
42 38
42 16
80 12
80 37
80 69
80 63
12 51
27 37
27 8
27 36
27 28
3 37
3 66
37 21
37 35
8 56
8 45
66 11
78 76
78 38
47 29
47 71
47 25...

output:

OK, 4903 wywolan MoveProbe()

result:

ok 

Test #114:

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

input:

80 79 0
1 80
80 2
2 79
79 3
3 78
78 4
4 77
77 5
5 76
76 6
6 75
75 7
7 74
74 8
8 73
73 9
9 72
72 10
10 71
71 11
11 70
70 12
12 69
69 13
13 68
68 14
14 67
67 15
15 66
66 16
16 65
65 17
17 64
64 18
18 63
63 19
19 62
62 20
20 61
61 21
21 60
60 22
22 59
59 23
23 58
58 24
24 57
57 25
25 56
56 26
26 55
55 ...

output:

OK, 16608 wywolan MoveProbe()

result:

ok 

Test #115:

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

input:

79 78 0
1 21
21 7
7 45
45 58
58 33
33 17
17 16
16 59
59 61
61 77
77 57
57 49
49 47
47 15
15 69
69 71
71 27
27 10
10 53
53 52
52 67
67 62
62 73
73 14
14 54
54 43
43 28
28 65
65 5
5 34
34 51
51 46
46 60
60 42
42 13
13 38
38 3
3 68
68 19
19 29
29 70
70 12
12 63
63 24
24 4
4 26
26 25
25 6
6 40
40 2
2 64...

output:

OK, 8403 wywolan MoveProbe()

result:

ok 

Test #116:

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

input:

80 79 0
1 18
1 15
15 37
37 41
1 30
30 43
18 11
43 52
52 25
1 72
25 35
1 31
41 76
35 59
1 36
36 23
59 6
31 67
72 2
11 79
79 14
14 29
76 9
67 66
2 73
73 54
29 75
6 50
75 68
9 55
66 17
54 71
1 24
68 7
24 78
78 49
55 39
17 77
71 33
33 21
50 70
70 12
39 13
77 74
13 26
49 27
21 19
74 8
26 47
23 69
47 57
1...

output:

OK, 11023 wywolan MoveProbe()

result:

ok 

Test #117:

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

input:

80 79 0
1 31
1 23
31 40
40 22
1 62
23 2
2 65
65 76
76 67
22 41
41 7
67 59
7 46
59 78
78 66
66 18
18 11
62 43
46 17
11 50
43 8
50 26
8 36
36 24
17 25
26 45
24 61
61 58
58 27
25 55
55 38
45 14
27 19
19 6
38 47
14 3
47 57
6 15
15 69
57 75
75 80
80 33
69 37
3 70
37 77
33 42
70 44
44 51
51 52
77 39
52 54...

output:

OK, 12526 wywolan MoveProbe()

result:

ok 

Test #118:

score: 1
Accepted
time: 1ms
memory: 4052kb

input:

80 90 0
1 44
44 2
2 39
39 73
73 68
68 20
20 61
61 60
60 58
58 1
29 42
42 55
55 13
13 29
39 29
35 41
41 25
25 17
17 34
34 21
21 35
13 34
32 16
16 79
79 49
49 65
65 63
63 23
23 15
15 7
7 46
46 32
34 23
53 64
64 69
69 36
36 74
74 9
9 53
46 53
28 31
31 22
22 77
77 72
72 52
52 4
4 71
71 28
9 52
56 54
54 ...

output:

OK, 12341 wywolan MoveProbe()

result:

ok 

Test #119:

score: 1
Accepted
time: 1ms
memory: 3956kb

input:

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

output:

OK, 5846 wywolan MoveProbe()

result:

ok 

Test #120:

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

input:

80 79 0
1 2
2 3
3 4
4 5
4 6
4 7
4 8
4 9
4 10
4 11
4 12
12 13
13 14
13 15
13 16
13 17
13 18
13 19
13 20
13 21
21 22
22 23
22 24
22 25
22 26
22 27
22 28
22 29
22 30
30 31
31 32
31 33
31 34
31 35
31 36
31 37
31 38
31 39
39 40
40 41
40 42
40 43
40 44
40 45
40 46
40 47
40 48
48 49
49 50
49 51
49 52
49 53...

output:

OK, 14398 wywolan MoveProbe()

result:

ok 

Subtask #7:

score: 1
Accepted

Test #121:

score: 1
Accepted
time: 1ms
memory: 4432kb

input:

150 1602 0
1 7
1 17
1 18
1 24
1 41
1 42
1 46
1 47
1 48
1 51
1 64
1 66
1 71
1 76
1 78
1 80
1 87
1 98
1 117
1 118
1 132
1 137
1 142
1 148
2 3
2 5
2 7
2 17
2 18
2 25
2 37
2 61
2 67
2 101
2 120
2 125
2 140
3 8
3 15
3 25
3 33
3 34
3 37
3 38
3 61
3 66
3 72
3 75
3 76
3 81
3 85
3 88
3 93
3 103
3 108
3 111
3...

output:

OK, 4328 wywolan MoveProbe()

result:

ok 

Test #122:

score: 1
Accepted
time: 1ms
memory: 4220kb

input:

150 11175 0
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
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1...

output:

OK, 1629 wywolan MoveProbe()

result:

ok 

Test #123:

score: 1
Accepted
time: 1ms
memory: 4468kb

input:

150 341 0
1 4
1 55
1 56
1 110
1 118
1 140
2 114
2 131
2 148
3 14
3 69
3 121
4 12
4 20
4 117
5 21
5 24
6 18
6 29
6 50
6 74
6 104
7 10
7 36
7 55
7 68
7 82
7 93
7 113
7 114
8 45
8 129
9 20
9 120
10 78
10 92
11 57
11 80
11 95
11 109
11 136
11 144
12 104
12 132
13 41
13 62
13 83
13 108
14 30
14 69
14 126...

output:

OK, 16835 wywolan MoveProbe()

result:

ok 

Test #124:

score: 1
Accepted
time: 1ms
memory: 4476kb

input:

149 155 0
1 110
110 59
1 78
110 92
59 139
1 30
59 114
1 93
114 67
1 143
59 119
92 27
93 50
27 61
93 98
50 66
98 60
110 97
61 144
92 89
60 99
144 26
110 138
26 136
61 76
114 39
136 135
27 103
103 51
76 63
98 2
139 7
2 17
1 24
103 84
1 111
50 70
99 21
143 31
78 113
113 52
139 12
7 83
143 81
21 141
17 ...

output:

OK, 35670 wywolan MoveProbe()

result:

ok 

Test #125:

score: 1
Accepted
time: 1ms
memory: 4128kb

input:

150 150 0
1 100
100 10
10 61
61 94
94 121
121 122
122 13
13 15
15 44
44 39
39 108
108 76
76 4
4 127
127 57
57 9
9 54
54 71
71 31
31 98
98 125
125 32
32 111
111 86
86 110
110 79
79 103
103 63
63 28
28 72
72 80
80 30
80 59
59 33
33 90
90 136
136 109
136 40
40 5
5 67
67 85
85 101
101 34
34 74
74 58
58 ...

output:

OK, 29733 wywolan MoveProbe()

result:

ok 

Test #126:

score: 1
Accepted
time: 1ms
memory: 4452kb

input:

150 149 0
1 51
51 81
81 37
37 67
67 130
130 99
99 120
120 54
54 50
50 24
24 83
83 43
43 101
101 90
90 127
127 138
138 93
93 111
111 70
70 92
92 11
11 56
56 17
17 32
32 26
26 9
9 97
97 136
136 29
29 107
107 123
123 133
133 40
40 7
7 2
2 105
105 45
45 145
145 61
61 98
98 15
15 3
3 82
82 58
58 131
131 ...

output:

OK, 23672 wywolan MoveProbe()

result:

ok 

Test #127:

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

input:

150 149 0
1 148
148 85
85 49
49 66
66 94
94 56
56 62
62 91
91 38
38 20
20 43
43 84
84 149
149 45
45 9
9 19
19 104
104 134
134 74
74 95
95 14
14 4
4 77
77 110
110 146
146 82
82 80
80 72
72 3
3 5
5 31
31 139
139 10
10 67
67 86
86 129
129 69
69 125
125 112
112 71
71 11
11 135
135 8
8 132
132 76
76 29
2...

output:

OK, 44689 wywolan MoveProbe()

result:

ok 

Test #128:

score: 1
Accepted
time: 1ms
memory: 4264kb

input:

150 275 0
55 1
71 55
68 71
85 68
49 85
21 49
126 21
4 126
128 4
135 128
50 1
33 50
33 55
77 33
77 71
78 77
78 68
13 78
13 85
111 13
111 49
12 111
12 21
140 12
140 126
15 140
15 4
116 15
116 128
63 116
63 135
89 50
141 89
141 33
99 141
99 77
39 99
39 78
118 39
118 13
64 118
64 111
130 64
130 12
150 1...

output:

OK, 28328 wywolan MoveProbe()

result:

ok 

Test #129:

score: 1
Accepted
time: 1ms
memory: 4472kb

input:

150 149 0
1 150
150 149
149 148
148 147
147 146
146 145
145 144
144 143
143 142
142 141
141 140
140 139
139 138
138 137
137 136
136 135
135 134
134 133
133 132
132 131
131 130
130 129
129 128
128 127
127 126
126 125
125 124
124 123
123 122
122 121
121 120
120 119
119 118
118 117
117 116
116 115
115 ...

output:

OK, 61434 wywolan MoveProbe()

result:

ok 

Test #130:

score: 1
Accepted
time: 1ms
memory: 4460kb

input:

150 149 0
80 1
94 2
73 3
39 8
88 9
124 10
93 12
118 15
141 20
31 22
6 26
28 29
101 28
88 31
92 32
11 35
77 39
149 40
145 44
86 45
86 47
121 49
116 50
30 52
59 53
56 54
105 55
111 56
33 59
76 63
121 64
101 66
146 69
130 73
7 76
17 77
134 17
71 79
136 80
46 81
24 82
92 83
38 84
143 86
129 87
133 89
18...

output:

OK, 49720 wywolan MoveProbe()

result:

ok 

Test #131:

score: 1
Accepted
time: 1ms
memory: 4460kb

input:

150 743 0
1 53
1 45
1 28
1 83
1 121
1 111
1 31
1 13
1 50
53 45
53 28
53 83
53 121
53 111
53 31
53 13
53 50
45 28
45 83
45 121
45 111
45 31
45 13
45 50
28 83
28 121
28 111
28 31
28 13
28 50
83 121
83 111
83 31
83 13
83 50
121 111
121 31
121 13
121 50
111 31
111 13
111 50
31 13
31 50
13 50
56 112
56 1...

output:

OK, 10482 wywolan MoveProbe()

result:

ok 

Test #132:

score: 1
Accepted
time: 1ms
memory: 4272kb

input:

150 299 0
1 65
1 26
1 52
65 53
65 50
65 18
53 26
53 52
26 50
26 18
50 52
52 18
121 105
121 58
121 89
121 6
105 139
105 82
105 9
139 58
139 89
139 6
58 82
58 9
82 89
82 6
89 9
9 6
11 112
11 126
11 3
112 16
112 74
112 38
16 126
16 3
126 74
126 38
74 3
3 38
127 103
127 110
127 101
127 79
103 122
103 13...

output:

OK, 25517 wywolan MoveProbe()

result:

ok 

Test #133:

score: 1
Accepted
time: 1ms
memory: 4184kb

input:

148 169 0
1 124
124 98
98 16
16 62
62 58
58 105
105 113
113 1
45 131
131 65
65 102
102 99
99 35
35 45
105 65
8 42
42 148
148 141
141 3
3 145
145 8
102 3
19 47
47 63
63 31
31 138
138 5
5 114
114 97
97 55
55 87
87 23
23 9
9 19
42 19
56 67
67 17
17 116
116 56
19 17
134 25
25 46
46 81
81 134
56 134
90 9...

output:

OK, 48001 wywolan MoveProbe()

result:

ok 

Test #134:

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

input:

150 149 0
1 149
1 150
150 148
148 147
147 136
147 137
147 138
147 139
147 140
147 141
147 142
147 143
147 144
147 145
147 146
146 135
135 124
135 125
135 126
135 127
135 128
135 129
135 130
135 131
135 132
135 133
135 134
134 123
123 112
123 113
123 114
123 115
123 116
123 117
123 118
123 119
123 12...

output:

OK, 84179 wywolan MoveProbe()

result:

ok 

Test #135:

score: 1
Accepted
time: 1ms
memory: 4460kb

input:

150 149 0
1 118
118 76
76 143
143 12
12 68
68 102
102 9
9 58
58 50
50 48
48 98
98 49
49 53
53 121
121 19
19 24
24 146
146 93
93 109
109 77
77 135
135 106
106 104
104 147
147 44
44 113
113 123
123 7
7 129
129 83
83 97
97 117
117 56
56 13
13 54
54 125
125 22
22 35
35 26
26 4
4 33
33 85
85 36
36 101
10...

output:

OK, 42715 wywolan MoveProbe()

result:

ok 

Test #136:

score: 1
Accepted
time: 1ms
memory: 4200kb

input:

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

output:

OK, 34986 wywolan MoveProbe()

result:

ok 

Test #137:

score: 1
Accepted
time: 1ms
memory: 4268kb

input:

150 687 0
1 5
1 26
26 75
5 75
1 75
1 14
26 14
75 14
5 14
1 88
75 88
14 88
5 88
1 122
88 122
5 122
26 122
14 122
75 122
1 58
122 58
26 58
88 58
5 58
58 61
1 61
122 61
75 61
88 61
26 61
5 61
14 11
61 11
122 11
122 90
61 90
58 90
88 90
11 90
26 86
122 86
5 86
90 86
1 86
88 86
14 86
58 86
75 59
88 59
1 ...

output:

OK, 10690 wywolan MoveProbe()

result:

ok 

Test #138:

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

input:

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

output:

OK, 9533 wywolan MoveProbe()

result:

ok 

Subtask #8:

score: 1
Accepted

Test #139:

score: 1
Accepted
time: 1ms
memory: 4808kb

input:

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

output:

OK, 107245 wywolan MoveProbe()

result:

ok 

Test #140:

score: 1
Accepted
time: 1ms
memory: 4808kb

input:

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

output:

OK, 99088 wywolan MoveProbe()

result:

ok 

Test #141:

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

input:

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

output:

OK, 87363 wywolan MoveProbe()

result:

ok 

Test #142:

score: 1
Accepted
time: 1ms
memory: 4552kb

input:

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

output:

OK, 87435 wywolan MoveProbe()

result:

ok 

Test #143:

score: 1
Accepted
time: 1ms
memory: 4556kb

input:

250 5371 0
1 3
1 7
1 12
1 13
1 23
1 30
1 34
1 35
1 36
1 37
1 47
1 52
1 53
1 57
1 60
1 61
1 65
1 70
1 74
1 110
1 113
1 115
1 125
1 134
1 136
1 138
1 143
1 148
1 172
1 184
1 192
1 197
1 199
1 200
1 202
1 209
1 212
1 216
1 227
1 245
2 24
2 44
2 48
2 52
2 60
2 63
2 72
2 77
2 89
2 91
2 93
2 95
2 98
2 104...

output:

OK, 6142 wywolan MoveProbe()

result:

ok 

Test #144:

score: 1
Accepted
time: 3ms
memory: 4664kb

input:

250 31125 0
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
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1...

output:

OK, 2729 wywolan MoveProbe()

result:

ok 

Test #145:

score: 1
Accepted
time: 1ms
memory: 4528kb

input:

250 254 0
1 70
1 172
1 34
1 195
70 28
1 250
1 39
1 83
1 50
70 205
1 100
1 221
1 179
70 143
1 64
1 149
1 222
1 166
1 110
1 41
50 208
195 185
250 176
34 31
172 148
28 211
1 53
1 89
34 190
1 174
1 134
70 58
1 67
172 49
172 81
1 44
70 74
1 94
1 162
1 66
70 127
1 71
1 8
195 186
1 175
70 181
1 107
64 29
1...

output:

OK, 136832 wywolan MoveProbe()

result:

ok 

Test #146:

score: 1
Accepted
time: 1ms
memory: 4844kb

input:

250 252 0
1 194
194 6
6 41
41 33
33 32
32 179
179 110
110 102
102 240
240 127
127 220
220 238
238 47
47 69
69 35
35 186
186 202
202 53
53 26
26 176
176 77
77 132
132 221
221 83
83 228
228 156
156 209
209 146
146 151
151 154
154 79
79 249
249 78
78 183
183 137
137 224
224 181
181 178
178 223
223 188
...

output:

OK, 122926 wywolan MoveProbe()

result:

ok 

Test #147:

score: 1
Accepted
time: 1ms
memory: 4568kb

input:

250 249 0
1 120
120 243
243 237
237 186
186 161
161 240
240 121
121 160
160 45
45 56
56 22
22 38
38 77
77 201
201 156
156 48
48 187
187 136
136 127
127 3
3 35
35 143
143 47
47 39
39 2
2 97
97 242
242 139
139 4
4 114
114 27
27 211
211 41
41 71
71 15
15 104
104 203
203 132
132 76
76 108
108 131
131 55...

output:

OK, 80310 wywolan MoveProbe()

result:

ok 

Test #148:

score: 1
Accepted
time: 1ms
memory: 4528kb

input:

250 249 0
1 129
129 92
92 63
63 240
240 96
96 43
43 75
75 167
167 157
157 31
31 133
133 130
130 186
186 209
209 62
62 226
226 248
248 166
166 135
135 88
88 247
247 246
246 203
203 245
245 71
71 197
197 56
56 233
233 152
152 228
228 55
55 115
115 153
153 161
161 154
154 72
72 180
180 114
114 250
250 ...

output:

OK, 94625 wywolan MoveProbe()

result:

ok 

Test #149:

score: 1
Accepted
time: 1ms
memory: 4564kb

input:

250 976 0
206 5
206 144
206 80
206 136
206 193
206 169
206 234
206 52
5 11
5 224
5 59
5 237
5 179
5 40
5 65
144 11
144 9
144 145
144 73
144 195
144 1
144 105
11 53
11 230
11 77
11 204
11 191
80 224
80 9
80 43
80 12
80 44
80 238
80 244
224 53
224 127
224 188
224 123
224 41
224 32
9 53
9 177
9 128
9 2...

output:

OK, 25663 wywolan MoveProbe()

result:

ok 

Test #150:

score: 1
Accepted
time: 1ms
memory: 4556kb

input:

250 467 0
200 1
241 200
184 241
162 184
147 162
17 147
75 17
181 75
115 181
41 115
247 41
97 247
11 97
234 11
197 234
171 197
174 171
56 174
6 1
193 6
193 200
226 193
226 241
16 226
16 184
4 16
4 162
88 4
88 147
136 88
136 17
50 136
50 75
53 50
53 181
133 53
133 115
32 133
32 41
68 32
68 247
187 68
...

output:

OK, 63032 wywolan MoveProbe()

result:

ok 

Test #151:

score: 1
Accepted
time: 1ms
memory: 4580kb

input:

250 1539 0
1 116
1 154
1 130
1 100
1 142
1 153
1 234
1 13
1 138
1 207
1 128
1 104
116 154
116 130
116 100
116 142
116 153
116 234
116 13
116 138
116 207
116 128
116 104
154 130
154 100
154 142
154 153
154 234
154 13
154 138
154 207
154 128
154 104
130 100
130 142
130 153
130 234
130 13
130 138
130 2...

output:

OK, 27871 wywolan MoveProbe()

result:

ok 

Test #152:

score: 1
Accepted
time: 1ms
memory: 4560kb

input:

250 579 0
1 209
1 227
1 212
1 195
209 7
209 182
209 198
7 227
7 212
7 195
227 182
227 198
182 212
182 195
212 198
198 195
72 129
72 220
72 64
72 225
129 199
129 214
129 126
129 197
199 220
199 64
199 225
220 214
220 126
220 197
214 64
214 225
64 126
64 197
126 225
225 197
236 77
236 203
236 240
236 ...

output:

OK, 120383 wywolan MoveProbe()

result:

ok 

Test #153:

score: 1
Accepted
time: 1ms
memory: 4524kb

input:

250 249 0
118 2
7 5
237 6
94 8
125 10
98 11
14 16
249 18
124 21
184 24
12 25
179 12
147 27
238 28
77 31
123 32
132 33
127 34
230 35
206 36
232 37
63 40
193 41
120 42
154 43
15 45
114 47
211 48
201 50
121 52
138 53
137 54
206 55
156 57
126 59
63 60
9 62
102 63
89 67
179 70
128 71
151 72
184 77
51 78
...

output:

OK, 107778 wywolan MoveProbe()

result:

ok 

Test #154:

score: 1
Accepted
time: 1ms
memory: 4592kb

input:

250 249 0
1 250
250 2
2 249
249 3
3 248
248 4
4 247
247 5
5 246
246 6
6 245
245 7
7 244
244 8
8 243
243 9
9 242
242 10
10 241
241 11
11 240
240 12
12 239
239 13
13 238
238 14
14 237
237 15
15 236
236 16
16 235
235 17
17 234
234 18
18 233
233 19
19 232
232 20
20 231
231 21
21 230
230 22
22 229
229 23...

output:

OK, 158218 wywolan MoveProbe()

result:

ok 

Test #155:

score: 1
Accepted
time: 1ms
memory: 4540kb

input:

250 249 0
1 139
1 42
42 168
1 127
1 167
168 102
127 209
1 59
102 111
139 130
111 92
209 188
92 43
43 40
167 215
130 53
1 51
215 103
103 29
1 71
40 61
29 144
188 28
53 183
144 21
61 195
71 67
51 143
21 75
143 82
28 213
213 98
82 191
195 177
59 229
98 174
177 206
174 140
191 26
183 200
229 72
206 234
...

output:

OK, 114282 wywolan MoveProbe()

result:

ok 

Test #156:

score: 1
Accepted
time: 1ms
memory: 4600kb

input:

249 396 0
1 105
105 242
242 120
120 111
111 228
228 88
88 149
149 133
133 138
138 15
15 148
148 125
125 62
62 141
141 31
31 100
100 44
44 131
131 47
47 165
165 121
121 63
63 186
186 73
73 211
211 79
79 172
172 135
135 152
152 221
221 128
128 39
39 232
232 182
182 126
126 65
65 171
171 6
6 61
61 162
...

output:

OK, 59582 wywolan MoveProbe()

result:

ok 

Subtask #9:

score: 1
Accepted

Test #157:

score: 1
Accepted
time: 2ms
memory: 5228kb

input:

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

output:

OK, 179153 wywolan MoveProbe()

result:

ok 

Test #158:

score: 1
Accepted
time: 2ms
memory: 5228kb

input:

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

output:

OK, 177081 wywolan MoveProbe()

result:

ok 

Test #159:

score: 1
Accepted
time: 2ms
memory: 4980kb

input:

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

output:

OK, 171999 wywolan MoveProbe()

result:

ok 

Test #160:

score: 1
Accepted
time: 2ms
memory: 5228kb

input:

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

output:

OK, 175058 wywolan MoveProbe()

result:

ok 

Test #161:

score: 1
Accepted
time: 2ms
memory: 5084kb

input:

350 7941 0
1 4
1 5
1 19
1 35
1 37
1 44
1 55
1 56
1 60
1 69
1 72
1 73
1 75
1 78
1 88
1 98
1 102
1 106
1 118
1 124
1 126
1 139
1 140
1 144
1 146
1 147
1 148
1 182
1 183
1 185
1 187
1 188
1 194
1 201
1 228
1 234
1 243
1 249
1 256
1 263
1 275
1 276
1 288
1 294
1 336
1 340
1 343
1 349
2 10
2 21
2 22
2 38...

output:

OK, 10797 wywolan MoveProbe()

result:

ok 

Test #162:

score: 1
Accepted
time: 6ms
memory: 4992kb

input:

350 61075 0
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
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1...

output:

OK, 3829 wywolan MoveProbe()

result:

ok 

Test #163:

score: 1
Accepted
time: 2ms
memory: 5048kb

input:

349 354 0
1 62
1 43
1 200
1 13
1 85
1 244
1 243
1 316
1 291
62 136
1 283
1 161
1 93
1 65
1 311
1 348
1 90
1 320
1 107
1 96
1 127
1 182
1 35
1 234
13 272
1 278
1 223
1 303
62 250
1 155
1 184
1 59
62 89
62 301
1 340
1 202
1 126
1 128
1 134
62 193
1 87
1 130
1 218
1 334
1 144
1 164
1 79
1 257
1 171
62 ...

output:

OK, 169981 wywolan MoveProbe()

result:

ok 

Test #164:

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

input:

350 353 0
1 337
337 117
117 309
309 106
106 205
205 308
308 234
234 331
331 220
220 223
223 333
333 118
118 148
148 214
214 164
164 98
98 110
110 30
30 227
227 51
51 48
48 247
247 140
140 217
217 232
232 114
114 279
279 281
281 243
243 338
338 61
61 287
287 260
260 58
58 83
83 271
271 109
109 197
19...

output:

OK, 178248 wywolan MoveProbe()

result:

ok 

Test #165:

score: 1
Accepted
time: 2ms
memory: 4972kb

input:

350 349 0
1 53
53 293
293 105
105 17
17 251
251 312
312 72
72 261
261 301
301 174
174 130
130 313
313 125
125 240
240 114
114 25
25 195
195 63
63 35
35 329
329 31
31 132
132 178
178 165
165 316
316 281
281 66
66 220
220 177
177 278
278 71
71 334
334 219
219 267
267 213
213 91
91 135
135 161
161 286
...

output:

OK, 124209 wywolan MoveProbe()

result:

ok 

Test #166:

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

input:

350 349 0
350 349
349 348
348 347
347 346
347 345
347 344
347 343
347 342
347 341
347 340
347 339
347 338
347 337
347 336
347 335
347 334
347 333
347 332
347 331
347 330
347 329
347 328
328 327
327 326
327 325
327 324
327 323
327 322
327 321
327 320
327 319
327 318
327 317
327 316
327 315
327 314
32...

output:

OK, 332551 wywolan MoveProbe()

result:

ok 

Test #167:

score: 1
Accepted
time: 2ms
memory: 4956kb

input:

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

output:

OK, 330387 wywolan MoveProbe()

result:

ok 

Test #168:

score: 1
Accepted
time: 2ms
memory: 5284kb

input:

350 349 0
1 115
115 293
293 94
94 198
198 290
290 136
136 205
205 148
148 63
63 151
151 41
41 128
128 210
210 173
173 191
191 4
4 52
52 245
245 11
11 33
33 39
39 139
139 268
268 22
22 267
267 120
120 307
307 282
282 255
255 174
174 217
217 264
264 162
162 281
281 118
118 23
23 78
78 274
274 321
321 ...

output:

OK, 134834 wywolan MoveProbe()

result:

ok 

Test #169:

score: 1
Accepted
time: 2ms
memory: 5260kb

input:

350 349 0
124 8
169 11
178 12
278 15
58 16
157 17
224 25
240 28
2 29
112 30
113 34
24 36
140 24
293 38
40 41
200 43
173 46
124 48
247 49
133 50
116 53
121 60
4 63
244 64
297 65
181 66
132 68
295 69
197 71
188 72
205 74
87 75
4 76
7 80
47 87
317 90
32 92
313 96
145 98
269 99
315 101
314 107
55 108
9 ...

output:

OK, 200937 wywolan MoveProbe()

result:

ok 

Test #170:

score: 1
Accepted
time: 2ms
memory: 4972kb

input:

350 409 0
1 247
247 94
94 70
70 204
204 152
152 1
29 205
205 122
122 74
74 29
70 29
349 139
139 311
311 35
35 223
223 280
280 349
74 280
248 295
295 131
131 141
141 340
340 113
113 248
139 131
190 124
124 96
96 45
45 190
131 124
305 303
303 239
239 90
90 59
59 316
316 245
245 322
322 305
124 303
108...

output:

OK, 154023 wywolan MoveProbe()

result:

ok 

Test #171:

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

input:

350 349 0
1 121
1 214
1 193
1 265
1 183
1 306
265 209
1 211
1 261
1 34
261 136
136 228
1 54
1 138
306 337
34 246
1 330
1 232
1 141
330 238
228 175
1 326
232 298
337 103
246 37
1 22
1 255
138 274
121 24
175 188
141 118
209 195
195 187
298 4
1 303
188 12
326 197
12 109
22 89
54 13
187 43
1 219
89 129
...

output:

OK, 211646 wywolan MoveProbe()

result:

ok 

Test #172:

score: 1
Accepted
time: 1ms
memory: 4976kb

input:

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

output:

OK, 67073 wywolan MoveProbe()

result:

ok 

Test #173:

score: 1
Accepted
time: 2ms
memory: 4980kb

input:

350 661 0
121 1
44 121
73 44
299 73
313 299
37 313
63 37
116 63
146 116
120 146
276 120
159 276
45 159
214 45
345 214
70 345
24 70
129 24
321 129
168 321
264 168
137 264
333 1
233 333
233 121
253 233
253 44
125 253
125 73
176 125
176 299
300 176
300 313
138 300
138 37
262 138
262 63
236 262
236 116
...

output:

OK, 175398 wywolan MoveProbe()

result:

ok 

Subtask #10:

score: 1
Accepted

Test #174:

score: 1
Accepted
time: 2ms
memory: 5532kb

input:

400 399 0
1 286
286 266
266 368
368 104
104 214
214 154
154 206
206 255
255 336
336 246
246 106
106 372
372 153
153 159
159 383
383 12
12 209
209 37
37 130
130 165
165 20
20 207
207 345
345 126
126 185
185 94
94 374
374 192
192 396
396 127
127 253
253 134
134 135
135 24
24 276
276 132
132 329
329 2
...

output:

OK, 246019 wywolan MoveProbe()

result:

ok 

Test #175:

score: 1
Accepted
time: 2ms
memory: 5212kb

input:

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

output:

OK, 228001 wywolan MoveProbe()

result:

ok 

Test #176:

score: 1
Accepted
time: 2ms
memory: 5184kb

input:

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

output:

OK, 244381 wywolan MoveProbe()

result:

ok 

Test #177:

score: 1
Accepted
time: 2ms
memory: 5472kb

input:

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

output:

OK, 214585 wywolan MoveProbe()

result:

ok 

Test #178:

score: 1
Accepted
time: 7ms
memory: 5532kb

input:

400 79800 0
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
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59
1 60
1...

output:

OK, 4379 wywolan MoveProbe()

result:

ok 

Test #179:

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

input:

400 7092 0
1 10
1 11
1 18
1 21
1 25
1 27
1 56
1 73
1 88
1 93
1 111
1 118
1 121
1 129
1 140
1 152
1 156
1 168
1 189
1 192
1 197
1 210
1 213
1 239
1 245
1 252
1 284
1 294
1 303
1 342
1 355
1 361
2 29
2 42
2 46
2 54
2 55
2 92
2 93
2 96
2 106
2 111
2 151
2 157
2 167
2 180
2 197
2 202
2 233
2 267
2 279
2...

output:

OK, 16927 wywolan MoveProbe()

result:

ok 

Test #180:

score: 1
Accepted
time: 2ms
memory: 5196kb

input:

400 405 0
1 318
318 51
51 315
315 360
360 53
53 208
208 50
50 99
99 398
398 49
398 340
340 146
146 112
112 72
72 309
309 333
333 358
358 312
312 338
338 375
375 239
239 70
70 192
192 156
156 209
209 352
352 23
23 122
122 302
302 158
158 195
195 344
344 74
74 343
343 91
91 183
183 218
218 313
313 321...

output:

OK, 167508 wywolan MoveProbe()

result:

ok 

Test #181:

score: 1
Accepted
time: 2ms
memory: 5264kb

input:

400 399 0
1 113
113 168
168 68
68 147
147 313
313 185
185 131
131 77
77 118
118 60
60 95
95 299
299 373
373 76
76 101
101 139
139 291
291 37
37 122
122 398
398 334
334 6
6 287
287 366
366 389
389 277
277 368
368 360
360 344
344 44
44 170
170 61
61 142
142 369
369 97
97 78
78 98
98 340
340 4
4 297
29...

output:

OK, 154394 wywolan MoveProbe()

result:

ok 

Test #182:

score: 1
Accepted
time: 1ms
memory: 5520kb

input:

400 1401 0
56 256
56 12
56 220
56 260
56 75
126 4
126 210
126 3
126 301
126 100
310 256
310 4
310 389
310 46
310 313
256 6
256 203
256 174
256 228
256 299
256 129
4 6
4 339
4 50
4 51
4 337
4 278
6 333
6 201
6 155
279 12
279 389
279 166
279 400
279 26
279 261
12 203
12 18
12 269
12 371
12 357
389 203...

output:

OK, 72421 wywolan MoveProbe()

result:

ok 

Test #183:

score: 1
Accepted
time: 3ms
memory: 5240kb

input:

400 399 0
1 400
400 399
399 398
398 397
397 396
396 395
395 394
394 393
393 392
392 391
391 390
390 389
389 388
388 387
387 386
386 385
385 384
384 383
383 382
382 381
381 380
380 379
379 378
378 377
377 376
376 375
375 374
374 373
373 372
372 371
371 370
370 369
369 368
368 367
367 366
366 365
365 ...

output:

OK, 438809 wywolan MoveProbe()

result:

ok 

Test #184:

score: 1
Accepted
time: 3ms
memory: 5336kb

input:

400 399 0
1 400
400 2
2 399
399 3
3 398
398 4
4 397
397 5
5 396
396 6
6 395
395 7
7 394
394 8
8 393
393 9
9 392
392 10
10 391
391 11
11 390
390 12
12 389
389 13
13 388
388 14
14 387
387 15
15 386
386 16
16 385
385 17
17 384
384 18
18 383
383 19
19 382
382 20
20 381
381 21
21 380
380 22
22 379
379 23...

output:

OK, 403168 wywolan MoveProbe()

result:

ok 

Test #185:

score: 1
Accepted
time: 2ms
memory: 5328kb

input:

400 438 0
1 126
126 5
5 259
259 163
163 295
295 260
260 301
301 392
392 243
243 1
149 95
95 33
33 136
136 131
131 27
27 306
306 34
34 109
109 336
336 13
13 356
356 393
393 11
11 149
295 109
194 97
97 50
50 235
235 376
376 244
244 171
171 20
20 145
145 85
85 279
279 141
141 208
208 293
293 194
109 37...

output:

OK, 281677 wywolan MoveProbe()

result:

ok 

Test #186:

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

input:

400 7084 0
1 259
1 103
1 5
1 260
1 102
1 243
1 172
1 378
1 279
1 113
1 64
1 264
1 315
1 192
1 99
1 331
1 188
1 80
1 146
1 311
1 354
1 335
1 42
1 2
1 257
1 104
1 237
1 226
1 377
1 11
1 150
1 281
1 173
1 13
1 56
259 103
259 5
259 260
259 102
259 243
259 172
259 378
259 279
259 113
259 64
259 264
259 3...

output:

OK, 61394 wywolan MoveProbe()

result:

ok 

Test #187:

score: 1
Accepted
time: 2ms
memory: 5256kb

input:

400 1839 0
1 238
1 310
1 115
1 76
1 334
1 298
1 16
1 209
1 147
238 43
238 288
238 118
238 156
238 4
238 162
238 277
238 175
43 310
43 115
43 76
43 334
43 298
43 16
43 209
43 147
310 288
310 118
310 156
310 4
310 162
310 277
310 175
288 115
288 76
288 334
288 298
288 16
288 209
288 147
115 118
115 15...

output:

OK, 184519 wywolan MoveProbe()

result:

ok 

Test #188:

score: 1
Accepted
time: 3ms
memory: 5208kb

input:

400 20001 0
1 223
1 66
1 44
1 380
1 23
1 326
1 10
1 226
1 12
1 360
1 389
1 5
1 231
1 315
1 215
1 399
1 188
1 95
1 22
1 247
1 34
1 185
1 217
1 352
1 267
1 132
1 216
1 256
1 200
1 184
1 347
1 228
1 325
1 388
1 167
1 77
1 108
1 73
1 242
1 92
1 221
1 59
1 203
1 17
1 127
1 177
1 379
1 180
1 2
1 122
1 148...

output:

OK, 77460 wywolan MoveProbe()

result:

ok 

Test #189:

score: 1
Accepted
time: 2ms
memory: 5212kb

input:

399 398 0
1 238
1 291
1 352
238 223
1 64
223 115
64 376
376 204
291 217
204 211
211 241
352 358
241 176
176 107
107 274
115 220
358 324
274 202
202 78
324 355
220 281
355 303
281 27
303 205
27 208
205 221
78 47
1 77
47 184
221 182
182 276
276 277
277 91
184 45
45 396
91 230
396 46
46 143
208 121
77 ...

output:

OK, 293669 wywolan MoveProbe()

result:

ok 

Test #190:

score: 1
Accepted
time: 3ms
memory: 5460kb

input:

400 399 0
1 399
1 400
400 398
398 397
397 378
397 379
397 380
397 381
397 382
397 383
397 384
397 385
397 386
397 387
397 388
397 389
397 390
397 391
397 392
397 393
397 394
397 395
397 396
396 377
377 358
377 359
377 360
377 361
377 362
377 363
377 364
377 365
377 366
377 367
377 368
377 369
377 37...

output:

OK, 616826 wywolan MoveProbe()

result:

ok 

Test #191:

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

input:

400 660 0
1 270
270 307
307 364
364 17
17 224
224 256
256 277
277 156
156 128
128 109
109 148
148 175
175 39
39 276
276 393
393 80
80 253
253 24
24 308
308 319
319 262
262 268
268 296
296 173
173 50
50 282
282 61
61 271
271 6
6 192
192 115
115 208
208 95
95 293
293 333
333 209
209 272
272 151
151 23...

output:

OK, 148500 wywolan MoveProbe()

result:

ok 

Test #192:

score: 1
Accepted
time: 2ms
memory: 5216kb

input:

400 399 0
148 1
94 2
286 3
52 5
51 12
68 15
179 16
347 20
290 21
4 24
74 4
381 28
75 31
194 33
169 34
290 36
349 37
337 43
327 45
345 46
62 48
382 49
197 53
162 56
283 58
61 59
278 61
39 70
325 73
333 77
179 78
317 81
10 82
389 89
244 91
128 92
220 95
291 98
314 100
107 102
60 104
191 106
368 109
37...

output:

OK, 277795 wywolan MoveProbe()

result:

ok 

Extra Test:

score: 0
Extra Test Passed