feat: new graph problems formatted.

This commit is contained in:
2026-08-24 14:47:58 -03:00
parent 5316029272
commit f89d4158cd
443 changed files with 2218170 additions and 0 deletions

97
metro/Makefile Normal file
View File

@@ -0,0 +1,97 @@
# Normal directories
SRC_DIR := src
BIN_DIR := bin
DBG_DIR := bin/debug
# Grader directories
GRADER := $(wildcard $(SRC_DIR)/grader.cpp)
GRADER_DIR := $(SRC_DIR)/grader
HANDLER_DIR := $(SRC_DIR)/handler
GRADER_SRC := $(wildcard $(GRADER_DIR)/*.cpp)
GRADER_BIN := $(patsubst $(GRADER_DIR)/%.cpp, $(BIN_DIR)/%, $(GRADER_SRC))
GRADER_DBG := $(patsubst $(GRADER_DIR)/%.cpp, $(DBG_DIR)/%, $(GRADER_SRC))
# Change CPP source directories if grader is defined
ifdef GRADER
SRC := $(wildcard $(HANDLER_DIR)/*.cpp)
BIN := $(patsubst $(HANDLER_DIR)/%.cpp, $(BIN_DIR)/%, $(SRC))
DBG := $(patsubst $(HANDLER_DIR)/%.cpp, $(DBG_DIR)/%, $(SRC))
else
SRC := $(wildcard $(SRC_DIR)/*.cpp)
BIN := $(patsubst $(SRC_DIR)/%.cpp, $(BIN_DIR)/%, $(SRC))
DBG := $(patsubst $(SRC_DIR)/%.cpp, $(DBG_DIR)/%, $(SRC))
endif
SRC_C := $(wildcard $(SRC_DIR)/*.c)
BIN_C := $(patsubst $(SRC_DIR)/%.c, $(BIN_DIR)/%, $(SRC_C))
DBG_C := $(patsubst $(SRC_DIR)/%.c, $(DBG_DIR)/%, $(SRC_C))
SRC_JAVA := $(wildcard $(SRC_DIR)/*.java)
BIN_JAVA := $(patsubst $(SRC_DIR)/%.java, $(BIN_DIR)/%.class, $(SRC_JAVA))
DBG_JAVA := $(patsubst $(SRC_DIR)/%.java, $(DBG_DIR)/%.class, $(SRC_JAVA))
CHECKER := $(wildcard $(SRC_DIR)/checker.cpp)
C := gcc
CPP := g++
CXX_FLAGS := -Wall -O2
DEBUG_FLAGS := -Wall -g
BOCA_FLAGS := -static -DBOCA_SUPPORT
JV = javac
JV_DEBUG = -g
JV_DIR = -d bin
JV_DBG_DIR = -d bin/debug
.PHONY: all debug release checker clean
all: debug release checker
debug: $(DBG) $(DBG_C) $(DBG_JAVA) $(GRADER_DBG)
release: $(BIN) $(BIN_C) $(BIN_JAVA) $(GRADER_BIN)
ifdef CHECKER
checker: $(DBG_DIR)/checker-boca $(BIN_DIR)/checker-boca
endif
$(BIN): $(BIN_DIR)/% : $(SRC_DIR)/%.cpp | $(BIN_DIR)
$(CPP) $(CXX_FLAGS) $^ -o $@
$(DBG): $(DBG_DIR)/% : $(SRC_DIR)/%.cpp | $(DBG_DIR)
$(CPP) $(DEBUG_FLAGS) $^ -o $@
$(BIN_C): $(BIN_DIR)/% : $(SRC_DIR)/%.c | $(BIN_DIR)
$(C) $(CXX_FLAGS) $^ -o $@
$(DBG_C): $(DBG_DIR)/% : $(SRC_DIR)/%.c | $(DBG_DIR)
$(C) $(DEBUG_FLAGS) $^ -o $@
$(BIN_JAVA): $(BIN_DIR)/%.class : $(SRC_DIR)/%.java | $(BIN_DIR)
$(JV) $(JV_DIR) $^
$(DBG_JAVA): $(DBG_DIR)/%.class : $(SRC_DIR)/%.java | $(DBG_DIR)
$(JV) $(JV_DEBUG) $(JV_DBG_DIR) $^
$(GRADER_BIN): $(BIN_DIR)/% : $(GRADER_DIR)/%.cpp $(GRADER) $(GRADER_DIR)/*.h
$(CPP) $(CXX_FLAGS) $^ -o $@
$(GRADER_DBG): $(DBG_DIR)/% : $(GRADER_DIR)/%.cpp $(GRADER) $(GRADER_DIR)/*.h
$(CPP) $(DEBUG_FLAGS) $^ -o $@
$(BIN_DIR):
mkdir -p $@
$(DBG_DIR):
mkdir -p $@
$(BIN_DIR)/checker-boca: $(SRC_DIR)/checker.cpp
$(CPP) $(CXX_FLAGS) $(BOCA_FLAGS) $^ -o $@
$(DBG_DIR)/checker-boca: $(SRC_DIR)/checker.cpp
$(CPP) $(DEBUG_FLAGS) $(BOCA_FLAGS) $^ -o $@
clean:
@echo Cleaning problem files
rm -rf bin

BIN
metro/image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

11
metro/input/1 Normal file
View File

@@ -0,0 +1,11 @@
6 10
1 6
1 3
4 1
3 4
5 4
3 5
2 5
3 2
6 3
2 6

312
metro/input/10 Normal file
View File

@@ -0,0 +1,312 @@
300 311
20 294
170 49
254 250
279 136
256 266
69 15
43 17
46 263
124 277
6 140
267 281
253 38
260 106
58 11
139 123
285 175
196 98
102 4
121 150
61 146
90 197
162 238
83 220
186 211
149 195
1 13
38 115
271 114
84 139
199 131
4 268
218 48
132 138
251 181
206 241
190 80
3 41
18 35
107 56
212 264
103 267
155 196
258 24
238 102
223 274
73 121
189 215
201 20
228 216
105 259
123 261
39 199
292 94
53 19
161 285
24 16
297 29
146 24
239 282
119 243
98 28
112 206
22 167
113 233
185 8
126 137
180 265
281 170
7 247
19 246
222 272
295 234
56 118
274 280
168 45
268 47
63 225
213 254
36 173
159 188
106 227
191 221
210 192
289 299
179 145
245 279
85 33
101 67
105 108
290 162
82 289
262 54
291 72
164 116
269 86
115 120
277 189
192 42
111 57
25 142
62 43
105 157
105 55
5 37
81 253
91 293
127 152
42 172
141 149
11 209
181 248
72 270
183 89
16 154
143 153
294 222
28 117
75 95
283 183
32 1
134 239
14 109
300 228
30 231
40 27
154 76
48 63
41 56
278 291
248 96
293 125
209 287
65 256
118 58
47 187
37 50
198 201
108 251
202 218
95 213
250 205
64 177
178 273
57 36
173 12
138 74
298 39
68 245
88 298
31 66
255 97
296 40
241 276
120 224
114 212
215 62
142 46
23 296
12 238
150 64
225 68
235 204
59 258
34 283
207 288
110 269
105 83
67 217
288 91
230 300
275 185
265 84
261 3
257 111
165 127
176 69
105 107
195 291
86 207
217 252
144 214
255 79
204 242
193 104
233 194
184 148
71 182
109 223
44 51
227 53
137 171
52 161
273 18
135 113
152 278
175 286
153 124
108 185
60 151
17 135
172 119
272 143
185 146
182 32
195 159
66 249
76 23
79 164
26 174
220 100
113 173
96 81
51 9
105 195
219 147
252 260
284 77
188 284
246 26
276 34
105 31
49 210
229 113
24 107
158 71
231 22
117 112
166 179
105 168
232 5
130 7
224 244
128 10
249 202
238 108
211 61
116 232
107 169
236 129
140 200
157 229
147 92
125 193
87 257
270 21
174 85
105 292
151 180
8 176
80 290
99 156
200 208
177 160
221 271
50 178
29 155
243 2
129 191
214 73
78 6
131 144
13 275
146 99
104 262
45 236
122 87
77 110
286 78
148 70
2 44
160 240
263 126
97 219
27 237
136 101
203 226
173 133
264 52
93 297
9 235
234 103
163 60
187 88
94 255
169 93
15 134
100 122
89 30
171 203
74 163
55 166
259 65
266 158
194 90
10 190
54 82
70 130
208 132
56 255
105 165
35 295
145 186
92 14
33 128
226 141
242 75
247 59
205 25
105 184
240 230
21 198

505
metro/input/11 Normal file
View File

@@ -0,0 +1,505 @@
500 504
200 402
70 351
181 307
358 29
452 264
100 89
236 254
238 302
16 43
30 240
3 392
395 346
112 266
133 321
203 270
124 260
7 381
408 88
149 281
158 441
497 133
280 95
168 244
482 480
181 295
185 248
163 271
379 385
150 225
498 431
421 173
329 216
71 45
458 38
472 97
450 99
362 92
318 250
165 194
300 67
339 243
31 464
387 452
15 155
305 20
190 111
278 436
58 357
230 2
74 477
392 191
409 449
404 311
109 233
222 74
388 256
20 457
119 206
170 309
61 353
178 174
302 11
39 157
18 122
187 12
171 53
497 136
19 121
413 5
264 388
479 164
105 28
356 46
79 73
32 120
403 205
120 193
399 497
106 495
143 141
237 339
276 312
459 90
129 427
191 204
223 134
132 180
64 93
196 82
283 6
381 78
470 395
21 192
474 429
483 120
279 322
244 279
26 430
495 21
385 51
9 318
23 165
108 384
180 335
55 71
210 91
145 341
186 399
391 208
54 316
438 213
266 154
397 215
195 492
428 41
257 185
184 125
448 160
273 265
333 37
206 308
319 331
12 259
242 272
181 162
232 412
353 404
67 414
138 140
216 473
487 32
40 10
349 150
309 273
94 466
436 340
127 435
382 403
485 138
401 491
126 263
218 422
11 228
188 81
332 220
243 476
181 277
102 317
229 245
176 201
63 227
174 285
347 258
110 156
295 261
453 175
160 13
322 61
411 115
467 332
44 482
384 387
28 54
98 103
8 379
202 48
172 484
370 313
466 72
76 474
263 30
162 127
481 407
323 493
338 39
355 486
233 83
42 286
231 458
288 7
464 207
116 292
72 342
431 475
166 470
117 354
254 139
97 499
265 362
435 284
281 75
416 305
406 221
304 249
221 198
282 124
312 44
393 104
299 116
290 488
120 280
346 415
327 376
50 394
113 485
316 398
268 471
90 420
294 203
88 234
284 63
193 59
93 497
476 363
334 85
85 114
131 56
49 408
365 64
204 237
314 189
480 86
181 271
429 171
475 184
234 218
155 345
83 117
463 300
14 158
434 487
296 327
478 290
52 186
86 375
46 235
57 330
375 446
156 343
368 496
369 344
144 296
159 66
41 360
147 188
199 23
114 142
235 293
378 390
292 393
418 19
246 418
245 179
101 224
373 169
371 365
287 147
405 428
261 289
213 251
390 123
36 439
198 76
69 438
192 329
451 118
53 6
182 450
462 187
161 40
38 219
417 498
456 119
25 291
445 161
146 400
446 24
130 177
99 334
426 382
293 288
376 349
151 310
35 212
306 222
189 16
344 230
249 253
179 355
22 246
240 58
2 55
157 269
363 315
493 479
153 50
136 294
68 356
255 137
6 386
197 303
272 469
439 462
471 172
419 110
95 195
239 337
494 143
477 112
87 167
81 478
62 455
414 69
56 47
152 65
340 423
420 26
490 304
461 413
103 60
205 166
80 283
359 406
342 106
341 129
443 200
311 229
357 107
51 176
92 1
212 405
260 223
394 128
398 146
317 377
328 459
10 98
228 467
402 242
226 453
262 483
354 361
104 9
422 274
337 276
424 338
177 49
219 391
224 432
386 434
215 42
259 444
271 3
84 297
374 62
455 4
5 14
154 255
225 358
122 52
277 373
348 262
410 17
251 152
486 366
253 463
169 144
139 87
330 267
267 425
298 238
412 109
135 494
325 170
351 426
361 448
275 443
93 468
65 15
214 35
457 380
345 31
433 131
175 148
107 77
141 252
258 421
37 368
82 445
444 18
43 348
208 324
380 301
427 500
310 352
396 319
315 299
125 199
140 440
423 163
389 113
425 130
271 326
320 8
89 149
489 93
449 202
274 27
499 197
173 433
285 145
148 168
286 80
59 489
350 416
473 25
217 183
496 314
291 328
73 396
289 323
167 232
432 275
313 364
270 101
364 282
303 465
60 367
500 287
194 456
308 241
27 84
207 70
4 298
118 278
252 325
468 226
121 178
447 409
209 34
164 347
383 209
437 214
400 424
91 417
241 239
33 135
297 108
488 236
24 401
492 182
352 268
442 411
142 102
227 306
17 57
13 370
134 36
372 442
115 231
465 419
331 447
34 378
96 383
321 196
6 374
250 389
335 320
45 132
441 350
360 461
484 153
377 410
201 159
307 96
491 257
415 68
440 211
343 336
48 217
123 94
367 210
75 190
220 100
78 79
29 22
137 371
324 472
183 397
336 247
47 372
269 481
247 333
1 490
430 105
77 151
248 460
469 451
66 33
454 437
407 454
301 359
326 369
111 126

512
metro/input/12 Normal file
View File

@@ -0,0 +1,512 @@
500 511
366 412
92 443
77 325
336 436
481 5
36 45
361 251
369 203
404 478
14 179
426 28
177 279
111 44
442 380
299 212
306 349
30 187
197 93
301 388
394 275
82 283
465 472
353 3
422 269
193 385
463 190
200 470
57 109
278 359
271 8
421 262
435 316
182 321
94 371
382 303
172 15
293 355
304 77
499 184
448 374
87 158
227 425
136 336
422 142
348 204
219 274
233 60
331 363
48 361
62 366
58 32
148 267
433 488
393 161
345 83
146 135
269 452
389 474
368 129
459 420
258 447
398 313
152 94
320 370
392 39
235 192
285 248
244 481
6 296
135 82
212 149
5 205
362 296
231 103
352 422
372 189
114 348
338 235
294 67
274 172
333 467
274 386
190 164
330 441
363 252
347 206
106 52
86 320
425 114
496 395
72 497
3 214
127 287
205 40
40 334
215 392
452 491
355 393
19 104
327 450
451 12
396 19
141 116
332 383
450 416
399 323
264 419
237 423
167 80
474 78
50 111
282 27
334 302
125 356
95 266
351 86
267 243
222 134
391 81
395 160
400 151
75 319
408 17
55 340
420 463
409 89
239 299
254 285
120 402
117 18
403 484
142 428
216 147
68 494
144 352
123 107
430 288
482 473
349 424
318 22
59 247
183 68
337 6
56 427
414 413
122 207
240 293
379 198
161 253
17 73
388 101
10 471
260 339
43 119
488 188
265 2
253 51
464 113
341 63
149 64
100 43
493 50
374 315
416 61
52 314
377 483
300 426
256 229
160 389
480 87
397 280
121 400
247 92
37 292
241 173
144 498
277 259
383 337
218 453
128 379
440 210
444 66
431 394
38 54
436 145
11 384
132 174
71 276
118 233
12 297
124 442
290 34
85 300
217 232
189 138
427 200
288 202
119 162
202 154
178 331
69 211
29 309
192 271
298 439
390 414
323 74
208 354
144 343
60 194
453 38
23 377
46 181
230 369
287 110
138 96
162 26
91 480
445 311
96 4
145 270
89 466
429 146
207 403
324 153
220 256
487 16
364 56
411 469
78 31
308 372
462 225
191 367
370 223
305 139
438 368
484 230
110 498
328 178
198 459
201 185
137 215
164 130
250 261
479 217
199 242
257 469
154 208
140 125
272 220
350 268
273 381
27 493
147 23
44 254
315 495
41 492
93 238
97 48
385 88
249 29
419 84
477 183
131 180
342 246
31 100
66 278
309 170
79 65
64 218
80 298
105 455
185 406
107 255
292 122
428 236
104 482
279 13
155 141
297 290
261 191
458 479
283 85
378 155
289 91
28 365
326 117
475 59
497 128
246 36
357 71
181 490
381 310
313 165
471 306
312 268
223 433
113 92
179 231
21 132
466 9
144 102
376 112
20 70
236 176
8 213
170 24
42 345
413 108
54 41
133 76
139 245
144 127
434 411
311 260
229 123
470 462
153 57
386 128
22 177
144 328
432 171
406 106
447 444
417 55
248 37
303 429
262 226
325 446
443 115
423 487
225 42
70 418
307 265
449 136
468 435
203 62
109 477
329 137
266 121
9 382
35 286
441 307
457 461
18 291
322 391
275 282
61 195
500 378
446 79
344 434
485 347
214 1
7 432
73 281
456 344
169 312
33 329
156 75
151 224
90 338
108 342
67 405
255 332
495 244
112 199
134 486
346 415
316 168
210 353
319 396
489 263
13 49
187 448
116 496
412 193
180 431
83 35
32 386
234 166
473 465
478 20
476 456
144 98
407 387
469 422
81 357
4 150
175 333
15 375
88 421
375 326
228 294
213 404
245 249
101 308
1 289
115 454
259 430
84 410
367 301
226 156
467 90
128 295
224 216
16 10
296 105
159 97
65 14
39 458
174 489
321 58
144 362
188 499
98 407
144 228
384 272
144 219
281 449
232 197
74 500
280 69
157 47
460 322
483 239
486 468
209 99
126 167
238 330
354 317
415 408
424 364
103 118
472 237
92 110
340 133
359 196
317 182
51 222
455 264
102 169
268 398
243 120
286 240
204 46
49 305
34 318
221 460
405 152
365 209
498 274
439 124
314 30
461 399
184 126
454 376
168 451
211 409
360 250
130 324
143 304
195 373
252 284
144 445
358 351
387 53
186 464
492 11
371 335
343 72
163 350
284 257
144 277
270 390
158 358
380 485
251 273
99 148
45 21
24 143
263 241
373 234
173 401
63 258
25 175
401 294
310 341
171 163
296 417
242 157
194 327
76 7
386 360
356 476
302 131
335 33
150 457
47 25
437 221
410 438
166 397
165 140
176 113
129 227
2 440
402 346
339 475
26 437
53 186
295 201
206 159
196 95

571
metro/input/13 Normal file
View File

@@ -0,0 +1,571 @@
500 570
372 340
162 179
307 477
219 483
54 290
297 499
161 31
319 235
500 67
179 158
434 413
409 415
217 118
213 430
252 319
36 193
494 368
337 497
412 169
79 321
227 314
71 104
447 110
1 186
374 393
149 88
161 165
139 6
456 305
161 46
153 357
297 481
197 241
333 343
427 409
238 239
281 500
295 210
164 146
161 32
265 11
64 424
10 53
47 30
133 491
161 277
161 401
481 384
470 117
129 272
253 255
278 213
45 219
147 414
469 284
243 19
361 51
212 200
265 203
204 25
161 310
228 142
483 173
334 440
437 369
441 28
185 436
161 455
123 339
161 90
402 474
429 121
161 432
444 472
332 125
161 336
95 198
63 33
110 70
421 133
269 1
89 101
150 334
386 176
161 279
264 271
294 126
272 356
226 288
2 374
155 407
347 145
231 223
21 316
161 174
73 45
482 152
135 201
145 373
161 392
130 300
222 80
161 355
86 476
161 331
49 248
234 417
255 175
121 485
161 420
491 236
499 394
305 282
495 111
214 489
35 495
104 327
435 416
284 136
245 431
16 48
302 12
327 473
161 185
31 479
70 418
482 99
161 59
254 15
328 444
82 229
96 155
88 85
4 496
62 22
477 333
80 143
388 326
462 342
459 199
18 244
97 214
394 263
161 461
405 132
161 112
161 457
157 240
442 127
235 16
266 213
20 191
165 42
188 353
38 429
446 422
194 402
201 487
306 184
178 285
161 189
267 435
489 49
183 421
111 441
55 228
416 29
493 388
457 484
317 423
161 471
105 35
247 362
293 304
342 39
355 73
131 344
108 309
51 360
314 204
365 130
138 306
254 237
487 5
366 280
241 322
6 287
210 426
171 151
161 156
190 237
280 123
161 292
379 404
154 34
25 328
277 231
350 44
161 341
206 147
127 256
385 298
329 411
166 438
191 338
113 183
41 97
161 74
14 197
53 339
244 261
261 250
340 134
61 84
208 182
168 368
161 154
414 137
382 226
438 109
274 78
413 98
311 493
228 167
225 273
181 371
40 391
488 264
124 24
404 350
325 87
417 21
161 412
161 140
242 451
418 141
174 266
304 188
271 492
128 99
57 92
142 239
388 23
408 488
276 443
290 164
466 47
443 159
368 442
34 459
267 86
232 2
465 481
389 77
112 341
352 128
310 460
476 262
298 445
102 433
161 379
161 302
56 17
161 478
8 311
33 308
106 458
26 20
431 37
460 89
299 251
483 253
258 382
161 346
480 283
65 335
392 65
126 301
362 347
268 7
136 325
481 483
146 13
275 337
455 135
7 295
497 243
161 494
166 397
161 428
200 297
161 453
81 385
163 463
308 56
343 428
28 439
60 202
50 323
279 114
436 208
17 163
473 153
448 112
237 456
216 14
406 129
282 157
85 299
199 68
309 296
203 281
239 484
253 482
66 464
336 220
161 452
13 433
407 434
236 221
363 268
32 351
161 395
346 424
221 50
74 82
316 446
198 399
118 149
490 113
403 454
475 158
161 465
433 343
161 418
60 258
98 291
283 185
119 227
175 462
185 55
397 38
303 398
273 269
287 100
301 348
410 390
218 194
44 259
70 419
475 425
99 441
356 75
428 297
46 40
300 120
161 206
411 366
215 260
378 103
161 456
391 203
19 3
305 199
331 354
249 233
161 148
424 293
230 209
199 448
101 274
72 408
395 212
491 166
52 69
292 225
315 276
167 138
344 172
346 76
143 468
122 52
479 234
192 486
449 320
320 403
161 254
37 381
148 447
161 195
161 438
5 18
189 278
78 318
9 345
24 122
209 95
451 257
359 43
140 304
161 253
109 178
48 349
318 228
75 367
12 218
77 275
383 370
422 278
348 66
387 81
42 498
279 363
341 388
28 303
3 437
461 190
322 375
374 283
197 70
486 396
161 359
213 494
281 346
134 383
86 94
262 387
448 171
239 376
312 450
117 211
91 252
377 249
93 324
398 27
453 55
43 13
291 222
161 142
381 386
161 105
151 466
467 71
187 427
169 196
23 396
324 180
331 246
224 410
161 28
161 150
432 91
369 57
161 380
116 10
177 170
69 160
182 470
87 217
158 5
396 124
120 406
161 286
472 289
256 449
207 64
233 216
335 62
364 246
161 324
202 133
68 294
103 36
343 358
161 480
161 448
58 131
161 60
161 293
324 437
478 168
349 177
351 265
458 475
450 372
393 332
286 202
152 72
419 139
195 312
90 106
439 254
285 4
237 83
437 2
161 231
161 116
99 400
354 469
231 475
144 207
257 329
170 192
248 114
289 108
339 267
360 215
370 352
468 61
368 60
220 166
161 482
132 490
260 115
296 8
440 361
438 331
186 41
474 232
246 279
94 54
137 238
59 93
330 491
161 102
161 364
401 307
229 439
112 26
384 224
396 277
471 330
13 181
484 247
142 79
498 467
263 313
161 281
158 378
161 23
380 305
379 365
114 197
161 389
172 96
176 379
115 405
18 93
304 422
439 230
161 86
259 242
357 18
452 107
326 270
400 9
246 205
156 377
371 317
84 245
196 144
418 58
22 119
484 265
107 374
358 187
420 162
161 267
313 315
159 63

600
metro/input/14 Normal file
View File

@@ -0,0 +1,600 @@
500 599
145 86
79 301
311 403
222 397
213 98
344 330
453 408
63 137
361 48
105 142
173 6
184 51
255 147
179 329
406 312
160 234
42 381
165 261
337 303
142 111
90 465
393 119
234 77
205 194
191 410
441 122
17 136
90 94
100 251
90 265
90 119
458 260
23 138
139 254
104 344
90 364
132 259
90 400
371 83
462 370
141 420
73 84
52 483
90 429
90 489
352 129
312 239
103 9
430 152
72 473
198 458
409 197
159 351
401 347
89 471
312 398
390 307
21 356
417 489
90 383
133 350
247 452
90 206
420 474
105 193
116 176
39 449
482 224
397 416
208 102
450 299
82 417
177 234
230 243
359 28
140 389
143 81
203 96
55 319
90 373
201 414
119 406
271 169
25 480
310 364
90 8
148 348
442 273
461 121
276 396
45 446
159 371
209 286
353 479
467 45
24 41
90 233
396 69
135 53
214 21
60 328
90 36
90 31
342 331
120 393
324 311
144 62
431 26
40 326
463 426
90 100
90 412
242 361
16 246
90 142
259 292
320 323
285 236
90 467
61 185
296 65
289 392
227 204
244 72
98 406
493 284
252 292
422 482
90 450
484 187
168 417
329 433
95 106
90 496
239 242
264 245
363 248
90 151
94 437
80 366
115 222
443 237
33 422
423 399
197 499
398 386
267 34
90 464
110 229
114 15
90 73
90 21
488 18
231 115
70 39
195 349
400 465
69 223
382 309
335 161
90 153
212 205
416 443
414 188
130 356
166 367
358 409
90 457
90 488
424 42
15 173
263 391
283 46
334 280
129 490
473 69
499 365
270 412
90 24
90 291
249 470
90 279
171 148
295 127
90 341
288 369
128 177
96 199
381 313
90 460
272 478
97 16
81 395
22 27
378 172
6 33
47 242
303 158
65 440
254 159
242 214
106 43
414 196
37 267
131 145
90 207
279 77
156 468
407 70
310 32
118 383
356 472
325 244
370 500
19 297
344 194
113 168
90 425
474 101
101 274
454 13
300 57
493 283
90 440
182 214
251 493
456 37
90 338
402 462
59 220
413 411
307 116
117 423
68 221
302 191
48 353
109 333
188 89
446 51
481 415
38 375
291 469
226 79
90 252
328 200
86 195
440 78
164 257
28 253
174 105
75 153
237 14
306 67
464 281
238 436
204 233
194 464
408 317
333 407
155 38
90 282
395 159
76 201
425 63
90 157
475 154
299 105
90 182
196 65
232 107
369 183
29 178
392 461
90 47
377 162
241 377
323 322
90 126
192 88
169 491
118 346
90 325
43 150
346 232
91 374
385 222
447 56
54 431
449 475
85 430
18 302
176 334
354 11
234 258
211 497
277 264
197 125
90 421
185 419
137 320
3 109
90 76
483 269
63 40
239 332
93 427
13 112
282 44
460 212
90 342
315 363
445 110
44 160
403 411
492 444
21 454
94 184
178 247
90 104
485 35
280 93
161 189
434 263
90 445
55 178
341 120
99 7
401 79
286 327
90 25
90 228
53 249
77 174
292 378
243 439
90 351
187 441
210 156
253 140
111 473
77 360
281 487
305 85
90 123
90 59
432 118
180 225
216 498
46 305
50 432
393 336
339 66
162 355
432 103
380 255
317 310
496 196
425 211
149 203
90 91
11 400
90 385
90 354
78 466
1 405
90 459
90 135
90 477
122 155
448 43
178 94
12 338
469 312
235 54
224 306
459 60
313 335
217 463
257 144
90 352
389 272
356 249
436 324
372 300
362 108
90 216
236 230
90 340
160 52
494 117
355 75
308 294
306 55
51 310
196 288
351 204
294 64
480 87
421 97
477 250
90 235
357 289
174 380
366 298
433 58
9 434
500 226
343 137
220 413
215 275
62 466
374 71
58 394
90 246
447 141
147 295
489 25
207 17
321 19
90 453
332 240
69 252
269 271
90 111
475 8
451 130
420 409
138 362
186 134
136 339
90 164
189 61
338 82
316 95
90 231
90 180
175 3
90 358
158 485
153 477
404 170
90 132
375 321
384 186
90 254
428 357
7 481
123 50
326 304
90 128
327 165
387 10
413 318
99 115
90 250
126 197
368 12
349 495
470 133
71 131
41 201
426 209
486 270
233 120
314 125
490 239
405 184
90 175
399 238
163 315
468 171
90 113
376 11
146 22
108 382
152 428
90 139
256 208
365 455
90 296
301 181
225 345
90 486
66 192
5 442
331 425
90 368
107 388
498 432
301 354
319 68
364 344
246 50
90 493
90 75
495 276
90 376
222 95
32 277
27 268
345 447
151 114
90 174
457 413
491 217
410 163
190 20
92 285
199 494
124 4
25 457
183 167
90 290
229 284
218 124
228 241
364 23
472 49
36 387
26 99
170 149
464 475
43 270
290 227
497 492
167 278
444 80
270 359
466 160
293 202
265 74
367 218
246 179
90 1
322 424
221 256
90 401
157 343
379 146
8 139
250 24
125 191
427 143
90 63
219 287
90 78
340 420
331 5
412 355
268 435
473 262
90 106
74 414
297 29
411 100
4 337
64 301
90 215
252 2
20 219
84 308
51 198
191 16
391 92
35 379
90 316
90 82
206 251
336 210
275 484
90 390
90 118
429 402
223 438
88 404
411 418
90 314
10 213
478 293
83 476
304 30
31 55
419 384
330 266
90 141
137 99
383 331
200 448
204 190
438 166
90 41
249 401
471 372
355 456
284 306
90 451
373 393
292 12
465 447

599
metro/input/15 Normal file
View File

@@ -0,0 +1,599 @@
500 598
216 54
473 67
23 347
449 173
118 444
78 32
193 231
499 263
17 126
153 254
314 358
38 398
75 439
446 352
146 251
146 335
328 342
427 106
24 386
278 85
382 2
339 384
318 291
386 289
270 129
146 373
219 149
282 481
361 344
288 176
462 253
172 73
393 20
392 497
146 137
93 278
41 65
331 490
146 494
330 63
284 189
229 251
146 84
142 103
77 435
120 253
264 118
258 225
374 314
203 354
132 379
105 138
146 170
146 356
146 162
312 44
358 134
451 390
146 363
47 24
357 456
344 158
90 388
34 198
290 430
166 393
309 414
146 124
474 461
384 195
13 131
251 485
447 448
485 362
51 78
488 34
263 123
433 425
450 326
252 286
334 148
472 107
146 143
179 319
8 235
168 17
79 118
146 119
146 228
70 320
96 185
30 333
296 458
342 455
146 21
91 309
199 62
417 274
351 262
10 387
146 347
464 410
218 383
217 39
146 409
239 121
121 201
9 18
481 122
437 28
347 355
398 325
146 245
486 499
336 346
118 115
369 391
139 171
354 416
146 12
444 256
428 475
146 368
5 257
233 277
146 52
235 420
129 206
353 465
146 307
146 315
146 278
236 218
208 294
240 402
37 432
394 317
146 486
176 431
418 500
287 474
397 246
466 182
83 417
146 191
492 182
138 154
327 381
453 296
146 79
225 53
100 311
432 283
271 406
388 401
177 419
146 389
146 377
306 49
346 450
146 126
65 374
376 175
439 400
20 112
146 339
146 219
366 100
292 380
115 399
445 197
54 238
146 89
311 140
58 208
500 14
326 484
239 17
146 452
260 483
124 228
305 265
103 247
71 460
146 414
356 103
94 488
368 199
19 281
443 64
241 252
146 78
49 457
195 149
88 60
162 116
56 104
254 56
7 70
460 125
33 139
157 245
371 72
289 42
146 438
303 361
32 124
110 156
404 365
422 167
385 243
146 147
40 110
146 275
163 209
407 79
132 452
50 367
427 61
73 11
440 13
479 312
87 351
302 212
237 5
424 59
146 38
375 136
257 90
104 157
323 466
194 1
495 214
245 241
412 415
112 51
146 309
146 376
310 230
146 479
233 255
250 491
36 161
398 477
324 41
146 428
52 113
200 308
313 322
146 195
325 315
63 61
146 240
423 343
167 227
180 427
267 357
61 434
89 105
88 180
18 422
406 75
209 395
224 202
390 270
146 91
135 166
160 192
190 159
309 293
173 405
311 215
108 169
316 328
171 47
250 424
205 115
383 470
478 288
211 418
122 105
215 356
146 74
55 26
294 403
245 261
146 197
227 187
256 411
220 19
497 332
238 35
207 331
362 404
274 440
146 427
471 240
243 51
442 462
493 88
117 310
174 66
231 443
84 325
407 297
125 464
389 340
228 233
180 433
197 266
476 120
370 29
408 160
113 346
146 248
226 80
365 476
216 248
419 102
185 83
333 87
197 119
304 184
138 377
421 292
101 71
165 224
249 43
164 295
323 27
146 241
253 391
255 348
82 304
59 188
348 50
494 144
475 445
6 221
12 290
140 98
155 392
183 192
146 225
461 453
454 482
459 210
76 234
169 23
273 287
25 32
315 88
349 114
355 275
146 203
457 152
181 155
134 360
405 36
475 298
283 259
248 499
149 323
146 492
32 459
3 10
364 471
230 127
119 57
146 272
420 426
22 165
146 399
26 81
435 284
281 280
74 141
438 91
234 478
269 205
414 239
253 396
489 153
1 7
146 112
186 394
146 233
202 194
144 169
51 4
280 9
146 408
150 220
416 190
92 193
352 349
409 242
149 321
319 226
482 337
2 37
99 128
151 15
295 39
146 364
467 311
15 413
259 172
85 16
146 168
360 76
469 423
332 421
286 69
322 353
491 132
403 318
182 340
240 494
130 236
345 472
161 313
128 216
391 467
146 180
147 466
91 359
329 498
255 447
39 196
498 177
436 3
136 6
222 239
413 327
97 336
301 40
184 449
64 109
146 471
146 20
278 398
387 204
265 55
343 77
483 95
106 145
131 33
191 355
158 45
146 75
212 142
192 397
317 446
86 495
109 436
359 372
45 407
66 463
189 101
146 93
410 74
241 97
291 371
242 135
209 364
169 273
31 232
11 179
146 23
380 48
62 120
338 178
146 269
122 244
81 213
29 437
27 133
146 164
198 279
262 92
378 301
146 183
465 412
72 207
146 138
383 334
340 479
175 445
300 338
146 264
141 324
320 473
206 300
213 468
350 157
43 491
479 216
279 22
468 329
146 302
337 200
146 330
214 305
152 96
272 323
499 104
377 93
146 493
14 25
80 86
346 317
148 454
178 117
204 267
379 223
137 144
67 382
68 271
244 378
429 285
146 350
268 82
146 255
143 407
126 307
75 250
124 46
21 68
275 258
307 428
146 442
146 249
210 441
146 258
170 406
192 438
146 366
452 122
156 174
48 150
146 186
146 97
107 489
104 8
146 348
496 30
348 384
415 469
363 370
146 108
183 429
146 215
317 209
146 303
399 183
232 393
28 99
103 166
69 480
116 130
431 487
146 163
146 31
98 341
308 451
102 181
335 345
490 496
373 211
146 217
61 383
401 58
146 250
146 369
146 336
438 375
225 295
228 299
146 132
455 94
39 143
57 170
381 268
487 306
146 57
276 237
400 260
196 111
456 151
146 467
187 276
430 222
42 229
159 282
146 385
146 475
127 316

1005
metro/input/16 Normal file

File diff suppressed because it is too large Load Diff

1100
metro/input/17 Normal file

File diff suppressed because it is too large Load Diff

1100
metro/input/18 Normal file

File diff suppressed because it is too large Load Diff

1077
metro/input/19 Normal file

File diff suppressed because it is too large Load Diff

18
metro/input/2 Normal file
View File

@@ -0,0 +1,18 @@
12 17
7 1
9 3
5 1
7 12
7 3
4 10
3 2
6 8
10 5
7 6
2 11
7 10
12 4
8 9
3 12
1 8
7 4

1023
metro/input/20 Normal file

File diff suppressed because it is too large Load Diff

2005
metro/input/21 Normal file

File diff suppressed because it is too large Load Diff

2100
metro/input/22 Normal file

File diff suppressed because it is too large Load Diff

4100
metro/input/23 Normal file

File diff suppressed because it is too large Load Diff

4067
metro/input/24 Normal file

File diff suppressed because it is too large Load Diff

4031
metro/input/25 Normal file

File diff suppressed because it is too large Load Diff

2005
metro/input/26 Normal file

File diff suppressed because it is too large Load Diff

2100
metro/input/27 Normal file

File diff suppressed because it is too large Load Diff

4100
metro/input/28 Normal file

File diff suppressed because it is too large Load Diff

4067
metro/input/29 Normal file

File diff suppressed because it is too large Load Diff

105
metro/input/3 Normal file
View File

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

4031
metro/input/30 Normal file

File diff suppressed because it is too large Load Diff

5005
metro/input/31 Normal file

File diff suppressed because it is too large Load Diff

5100
metro/input/32 Normal file

File diff suppressed because it is too large Load Diff

8100
metro/input/33 Normal file

File diff suppressed because it is too large Load Diff

8013
metro/input/34 Normal file

File diff suppressed because it is too large Load Diff

9030
metro/input/35 Normal file

File diff suppressed because it is too large Load Diff

9005
metro/input/36 Normal file

File diff suppressed because it is too large Load Diff

10100
metro/input/37 Normal file

File diff suppressed because it is too large Load Diff

10100
metro/input/38 Normal file

File diff suppressed because it is too large Load Diff

12013
metro/input/39 Normal file

File diff suppressed because it is too large Load Diff

109
metro/input/4 Normal file
View File

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

12011
metro/input/40 Normal file

File diff suppressed because it is too large Load Diff

15005
metro/input/41 Normal file

File diff suppressed because it is too large Load Diff

15100
metro/input/42 Normal file

File diff suppressed because it is too large Load Diff

15100
metro/input/43 Normal file

File diff suppressed because it is too large Load Diff

18099
metro/input/44 Normal file

File diff suppressed because it is too large Load Diff

18041
metro/input/45 Normal file

File diff suppressed because it is too large Load Diff

20098
metro/input/46 Normal file

File diff suppressed because it is too large Load Diff

20100
metro/input/47 Normal file

File diff suppressed because it is too large Load Diff

20011
metro/input/48 Normal file

File diff suppressed because it is too large Load Diff

20098
metro/input/49 Normal file

File diff suppressed because it is too large Load Diff

106
metro/input/5 Normal file
View File

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

20010
metro/input/50 Normal file

File diff suppressed because it is too large Load Diff

213
metro/input/6 Normal file
View File

@@ -0,0 +1,213 @@
200 212
78 23
111 83
131 60
49 158
38 76
74 144
124 58
16 112
122 47
135 53
190 165
69 67
25 150
146 94
148 1
198 189
29 17
63 146
93 108
32 182
188 197
3 46
107 157
188 78
35 14
150 97
6 44
22 136
125 154
84 54
179 85
12 33
170 180
110 122
67 72
8 16
174 148
182 79
188 7
98 69
46 135
132 194
85 173
86 168
143 149
119 99
55 59
149 74
129 45
70 193
24 29
197 49
9 156
116 75
36 128
127 41
48 169
186 103
141 140
42 124
43 90
194 145
27 177
188 4
10 68
103 104
177 127
189 19
134 3
89 51
184 5
95 160
100 48
56 198
121 196
15 115
152 55
52 16
11 151
58 100
92 34
133 56
14 129
128 43
107 87
96 39
106 142
117 35
188 71
155 161
188 163
20 162
51 144
65 130
2 123
191 51
13 164
99 64
81 147
161 88
91 11
53 138
71 166
192 110
156 137
82 109
34 141
154 155
87 60
160 24
181 84
137 119
188 2
60 171
164 167
123 106
188 77
88 117
130 134
28 114
188 126
199 32
90 62
4 92
21 61
64 195
169 21
185 192
1 10
172 116
105 86
31 27
2 191
151 57
26 1
57 133
39 20
1 159
176 82
163 98
115 30
196 96
68 175
120 143
61 186
162 65
168 70
193 191
138 181
79 185
66 183
166 22
7 118
188 91
188 200
183 63
188 25
187 101
180 9
47 26
83 84
60 2
37 107
147 95
94 172
140 174
101 42
198 107
157 139
200 131
104 199
118 190
45 50
72 132
77 153
145 38
114 15
16 198
76 120
109 31
59 153
139 36
144 77
41 12
102 105
40 121
33 13
178 8
153 170
30 66
153 80
173 89
44 111
54 52
18 40
113 37
126 81
188 179
50 18
73 178
23 152
97 102
158 6
77 184
80 93
136 73
17 113
108 187
167 28
175 176
165 87
75 125

219
metro/input/7 Normal file
View File

@@ -0,0 +1,219 @@
200 218
143 126
172 56
118 60
85 179
166 200
152 197
161 189
31 130
99 178
76 32
191 176
18 121
124 81
159 45
98 144
144 80
12 140
37 71
151 5
51 89
164 76
161 28
41 31
182 120
148 99
125 34
106 128
129 195
165 186
177 62
71 41
10 162
44 47
152 111
73 78
154 53
187 133
107 38
149 11
72 42
88 149
94 13
99 28
87 119
161 162
196 54
116 82
21 84
161 191
13 19
8 46
166 150
70 50
86 59
185 187
183 91
197 45
112 29
142 197
146 180
68 155
40 198
140 95
161 66
132 124
23 172
161 25
131 108
130 14
135 37
161 157
162 75
117 90
147 6
127 74
90 193
200 17
89 36
1 15
28 106
193 4
61 55
79 112
173 110
38 192
95 72
198 57
130 81
184 154
48 170
128 77
63 87
174 122
49 117
139 69
157 123
19 10
34 3
50 156
16 21
93 48
122 138
122 9
161 199
123 177
189 163
26 93
114 75
7 131
161 196
45 70
161 141
53 166
161 61
176 129
92 146
78 58
136 137
126 194
199 51
60 163
54 12
101 183
163 153
62 30
55 78
65 115
52 135
161 148
81 188
46 49
161 181
190 100
57 85
155 102
105 104
192 143
134 118
4 139
33 134
161 52
81 60
110 44
141 122
133 18
107 23
150 73
75 107
195 151
161 103
113 97
6 27
121 16
163 152
120 159
30 152
67 142
35 147
161 184
27 2
194 96
66 167
47 8
188 64
84 173
100 168
80 68
97 109
82 99
138 160
156 92
145 107
96 167
77 20
58 46
111 125
75 86
32 26
14 101
36 67
83 65
2 22
5 24
137 171
104 165
28 63
115 63
167 98
29 39
64 40
11 114
180 175
197 35
45 10
25 7
158 169
169 166
119 113
161 164
181 94
179 136
63 130
102 43
46 174
60 190
74 79
9 116
108 1
42 88
78 127
15 185
170 105
161 182
24 132
167 158
186 83
161 33
103 145

207
metro/input/8 Normal file
View File

@@ -0,0 +1,207 @@
200 206
165 37
146 106
99 178
53 78
32 114
69 99
10 2
13 1
12 69
155 46
48 40
26 5
193 46
169 196
122 176
5 102
9 151
39 70
198 90
54 67
59 170
94 56
156 30
130 55
126 73
123 137
51 75
115 35
57 105
8 63
164 38
168 121
184 135
31 172
119 131
60 147
74 61
3 144
2 70
30 93
190 169
17 9
177 4
42 175
162 50
139 6
137 15
125 3
40 51
36 98
22 136
111 120
87 122
112 8
153 167
19 126
189 97
55 2
132 130
173 44
102 150
182 119
159 125
171 13
183 87
133 59
199 39
129 86
71 157
167 198
41 49
176 76
64 41
121 127
109 161
75 81
120 62
93 80
47 148
90 82
29 101
97 22
197 103
43 85
77 139
14 64
180 166
52 16
85 28
78 110
76 83
136 19
158 12
105 173
104 48
191 96
194 197
192 42
186 55
148 14
170 54
23 112
181 108
88 94
114 74
179 194
187 27
38 115
17 186
67 124
103 145
131 18
98 34
143 26
17 65
91 179
79 36
6 20
107 189
58 10
46 154
70 71
195 153
20 200
73 47
141 193
160 32
117 88
62 160
1 58
25 60
128 111
17 199
138 142
147 29
56 24
80 79
108 138
27 171
28 116
55 190
96 192
68 184
7 152
135 163
11 143
34 182
83 180
92 25
178 181
163 113
144 177
18 33
46 105
49 159
17 109
16 68
188 100
150 107
175 195
157 133
17 43
172 134
70 80
124 95
82 11
151 187
61 104
17 164
142 77
174 7
63 129
149 128
81 140
66 92
33 66
72 158
80 146
50 45
44 165
4 132
185 186
140 174
84 117
166 72
37 118
105 185
116 23
161 52
100 156
101 183
196 21
45 141
106 155
15 191
127 31
145 89
200 149
65 188
110 168
35 84
134 57
113 53
24 162
118 91
86 123

306
metro/input/9 Normal file
View File

@@ -0,0 +1,306 @@
300 305
68 156
88 226
87 256
30 174
45 187
156 73
262 62
267 244
207 197
232 143
3 241
80 158
50 80
180 187
29 134
112 132
138 166
283 21
230 32
296 79
8 269
213 2
49 264
129 162
91 28
258 65
11 54
210 89
293 230
252 275
229 184
206 152
73 39
103 12
160 213
274 106
78 103
286 46
112 203
209 105
46 199
27 84
26 142
193 67
75 292
143 223
269 45
123 127
189 299
182 90
244 105
273 190
216 135
208 77
201 284
245 287
161 216
224 268
281 15
131 5
66 205
34 130
128 100
166 276
12 61
144 95
61 167
246 249
154 36
10 245
31 99
285 68
266 233
223 252
4 30
130 242
196 91
291 55
279 102
167 111
55 125
28 232
169 201
110 283
159 247
44 97
96 144
247 114
190 154
47 155
290 131
2 139
226 146
275 182
289 244
235 94
114 109
234 277
222 191
70 117
185 26
220 129
141 248
63 179
22 48
272 295
40 282
175 227
124 96
198 180
133 273
150 53
231 288
25 56
284 76
112 57
165 254
287 104
121 25
239 177
1 221
86 7
120 92
102 11
212 38
174 37
59 29
38 211
164 118
264 271
203 207
23 124
126 49
6 175
134 121
93 13
100 93
21 278
270 252
187 101
299 235
145 128
202 42
51 86
187 34
77 71
254 74
282 140
276 215
7 192
177 229
173 51
153 194
56 60
20 217
60 151
257 253
107 6
204 272
151 188
200 20
152 178
179 231
227 286
252 16
261 35
99 266
111 113
292 52
84 265
244 296
149 17
64 23
112 229
265 250
219 185
158 108
233 209
41 267
250 31
72 251
163 122
24 228
297 27
155 88
243 4
136 214
35 19
288 186
241 285
249 262
127 281
15 169
253 189
278 115
97 138
199 294
16 300
237 126
191 234
33 246
215 263
37 220
14 66
83 274
135 206
184 298
217 297
69 280
176 157
9 64
76 10
82 258
118 193
119 40
79 202
115 181
132 63
52 137
105 240
168 82
18 159
268 291
236 160
157 183
95 47
19 43
181 219
259 210
139 168
67 290
57 225
195 164
147 116
113 237
228 239
81 238
106 243
172 119
256 96
183 33
117 107
32 148
53 224
186 261
263 69
89 8
48 110
140 1
146 208
162 171
58 218
214 279
171 141
137 22
194 150
300 257
178 3
218 289
39 170
90 173
5 270
238 255
298 204
295 260
42 145
94 123
280 81
142 72
122 24
248 172
170 200
85 133
251 18
240 85
242 136
36 9
125 98
108 212
54 147
96 149
294 59
271 120
197 87
92 14
62 222
188 163
112 161
277 195
109 165
211 259
98 78
43 44
17 198
148 236
74 50
229 176
225 83
255 153
221 293
112 41
205 75
116 70
104 58
65 196

188
metro/maratona.cls Normal file
View File

@@ -0,0 +1,188 @@
\ProvidesPackage{maratona}
\LoadClass[11pt]{article}
% remove page numbers
\pagenumbering{gobble}
\RequirePackage{fancyhdr}
\RequirePackage{tabularx,colortbl}
%\RequirePackage{arial}
\RequirePackage{ifpdf}
\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}
\RequirePackage[portuguese]{babel}
\RequirePackage{graphics}
\RequirePackage{graphicx}
\RequirePackage{amssymb,amsmath,wrapfig}
\RequirePackage{xcolor,colortbl}
\RequirePackage{xcolor}
\RequirePackage{ifthen}
\oddsidemargin 0cm
\evensidemargin -2cm
\topmargin -1cm
\textwidth 16cm
\textheight 23cm
\ifpdf
\RequirePackage[pdftex]{hyperref}
\else
\RequirePackage[hypertex]{hyperref}
\fi
\newcommand{\var}[1]{\ensuremath{{#1}}}
\hypersetup{
letterpaper,
colorlinks=true,
linkcolor=blue,
urlcolor=blue,
pdfpagemode=none,
pdftitle={IV Maratona de Programação do IFB \today},
pdfauthor={},
pdfsubject={Caderno de problemas da IV Maratona de Programação do IFB },
pdfkeywords={maratona, programação, IFB}
}
\DeclareGraphicsExtensions{png}
\lhead{DS Contest Tools}
\pagestyle{fancy}
% Capa
\newenvironment{Maratona}[3]
{
\begin{titlepage}
\begin{center}
\vspace{1cm}
\Large{\textbf{#1}} \\
\vspace{1cm}
{\textbf{Caderno de Problemas}} \\
\vspace{1cm}
\begin{small}
\textsl{#2}
\end{small} \\
\begin{figure}[htp]
\begin{center}
\includegraphics[scale=1]{logos/logo-maratona.png}
\end{center}
\end{figure}
{(Este caderno contém {#3} problemas)} \\
\vspace{1cm}
}
{
\vfill
\begin{small}
{QNM 40, Área Especial nº 01,
Taguatinga/DF, 72146-000 ,
Brasil } \\
{Telefone (61) 2103-2200 \\http://www.ifb.edu.br/taguatinga} \\
\end{small}
\end{center}
\end{titlepage}
}
\newcommand{\Organizacao}[2]{
{\small \vfill
\begin{center}
\textbf{Comissão Organizadora:} \\
{#1} \\
\bigskip
\textbf{Apoio:}\\
{#2}
\end{center}
}
\vfill
}
% Problema
\newcounter{problem}
\newenvironment{Problema}[4]{
\stepcounter{problem}
\newpage
\begin{center}
\Large{\ifthenelse{\equal{#1}{}}{\textbf{{#2}}}{\textbf{Problema {#1} -- {#2} }}}{\\\footnotesize \textbf{Limite de tempo: {#3}s}}{\\[-0.1cm]\footnotesize \textbf{Limite de memória: {#4}MB}}
\end{center}
}
\newcounter{problemAutor}
\newenvironment{ProblemaAutor}[5]{
\stepcounter{problemAutor}
\newpage
\begin{center}
\Large{\ifthenelse{\equal{#1}{}}{\textbf{{#2}}}{\textbf{Problema {#1} -- {#2} }}}{\\\footnotesize \textbf{Limite de tempo: {#3}s}}{\\[-0.1cm]\footnotesize \textbf{Limite de memória: {#4}MB\\}}{
\footnotesize Autor: {#5}
}
\end{center}
}
% Código-fonte
\newcommand{\codigofonte}[1]{Nome do arquivo fonte: {#1}}
% Entrada
\newcommand{\Entrada}{
\bigskip
\begin{large}
\textbf{Entrada} \\
\end{large}
}
% Saida
\newcommand{\Saida}{
\bigskip
\begin{large}
\textbf{Saída} \\
\end{large}
}
\newcommand{\Interacao}{
\bigskip
\begin{large}
\textbf{Interação} \\
\end{large}
}
\newcommand{\Notas}{
\bigskip
\begin{large}
\textbf{Notas} \\
\end{large}
}
% Exemplo
\newenvironment{Exemplo}
{
\tabularx{\textwidth}{XX}
% {@{\extracolsep{\fill}}|l|l|}
% {|l|l@{\extracolsep{\fill}|}}
\hline
Entrada & Saída \\\hline
}
{
\hline
\endtabularx
}
% Exemplo de Entrada
\newenvironment{ExemploEntrada}
{
\bigskip
\begin{large}
\textbf{Exemplo} \\
\end{large}
}
{
}
% Sample Output

BIN
metro/metro-tutorial.pdf Normal file

Binary file not shown.

40
metro/metro-tutorial.tex Normal file
View File

@@ -0,0 +1,40 @@
\documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amsthm,amssymb}
\usepackage{fullpage}
\usepackage{url}
\pagenumbering{gobble}
\usepackage{hyperref}
\title{ Tutorial: Metro}
\author{OBI 2015}
\date{}
\begin{document}
\maketitle
O grafo do sistema tem uma propriedade importante: a estação central é a única
estação com grau pelo menos $5$, pois dela saem todas as linhas radiais. As
outras estações pertencem a caminhos radiais ou à linha circular. Mesmo uma
estação onde uma radial encontra o círculo tem grau no máximo $4$.
Primeiro encontramos essa estação central analisando os graus dos vértices.
Depois removemos a central do grafo. O que resta é a linha circular com alguns
caminhos pendurados nela, correspondentes aos trechos radiais antes ou depois do
círculo.
Para isolar somente a linha circular, fazemos uma poda de folhas:
\begin{enumerate}
\item calcule o grau de cada vértice desconsiderando a estação central;
\item coloque em uma fila todos os vértices de grau $0$ ou $1$;
\item enquanto a fila não estiver vazia, remova o vértice da frente e reduza
o grau de seus vizinhos ainda não removidos;
\item quando algum vizinho passar a ter grau $1$, coloque-o na fila.
\end{enumerate}
Esse processo remove todos os caminhos que estão pendurados no ciclo. Os
vértices que não foram removidos ao final são exatamente as estações da linha
circular, então basta contá-los.
\textbf{Complexidade de tempo:} $O(N + M)$.
\textbf{Complexidade de espaço:} $O(N + M)$.
\end{document}

BIN
metro/metro.pdf Normal file

Binary file not shown.

91
metro/metro.tex Normal file
View File

@@ -0,0 +1,91 @@
\documentclass{maratona}
\begin{document}
\begin{ProblemaAutor}{}{Metro}{1}{256}{OBI 2015}
As cidades da Cosmolândia usam sistemas de metrô com uma organização muito
regular. Existe uma estação central, várias linhas radiais saindo dela, e uma
linha circular que passa ao redor da estação central.
Cada linha radial começa na estação central, segue sem cruzar as outras linhas
radiais e encontra a linha circular em alguma estação. Depois desse encontro,
ela ainda pode continuar até regiões mais afastadas da cidade.
O sistema possui $N$ estações, numeradas de $1$ a $N$. Esses números não indicam
a posição das estações. Você recebe apenas a lista de ligações diretas entre
pares de estações e deve determinar por quantas estações passa a linha circular.
\begin{figure}[h]
\centering
\includegraphics[width=0.7\textwidth]{image.png}
\caption{Exemplo de um sistema de metrô da Cosmolândia.}
\end{figure}
\Entrada
A primeira linha contém dois inteiros $N$ e $M$ ($6 \le N \le 20000$,
$0 \le M \le 20100$), indicando respectivamente o número de estações e o número
de ligações diretas entre pares de estações.
Cada uma das próximas $M$ linhas contém dois inteiros $P$ e $Q$
($1 \le P, Q \le N$, $P \ne Q$), indicando que existe uma ligação direta entre
as estações $P$ e $Q$.
É garantido que o sistema descrito segue o padrão de metrô da Cosmolândia:
existe uma única estação central, dela saem pelo menos $5$ e no máximo $100$
linhas radiais, e há no máximo uma ligação direta entre qualquer par de
estações.
\Saida
Imprima um único inteiro: o número de estações pelas quais passa a linha
circular do sistema de metrô.
\ExemploEntrada
\begin{Exemplo}
\texttt{6~10} & \texttt{5}\\
\texttt{1~6} & \\
\texttt{1~3} & \\
\texttt{4~1} & \\
\texttt{3~4} & \\
\texttt{5~4} & \\
\texttt{3~5} & \\
\texttt{2~5} & \\
\texttt{3~2} & \\
\texttt{6~3} & \\
\texttt{2~6} & \\
\rowcolor{gray!20}\texttt{12~17} & \texttt{8}\\
\rowcolor{gray!20}\texttt{7~1} & \\
\rowcolor{gray!20}\texttt{9~3} & \\
\rowcolor{gray!20}\texttt{5~1} & \\
\rowcolor{gray!20}\texttt{7~12} & \\
\rowcolor{gray!20}\texttt{7~3} & \\
\rowcolor{gray!20}\texttt{4~10} & \\
\rowcolor{gray!20}\texttt{3~2} & \\
\rowcolor{gray!20}\texttt{6~8} & \\
\rowcolor{gray!20}\texttt{10~5} & \\
\rowcolor{gray!20}\texttt{7~6} & \\
\rowcolor{gray!20}\texttt{2~11} & \\
\rowcolor{gray!20}\texttt{7~10} & \\
\rowcolor{gray!20}\texttt{12~4} & \\
\rowcolor{gray!20}\texttt{8~9} & \\
\rowcolor{gray!20}\texttt{3~12} & \\
\rowcolor{gray!20}\texttt{1~8} & \\
\rowcolor{gray!20}\texttt{7~4} & \\
\end{Exemplo}
\Notas
No primeiro exemplo, a estação central é a estação $3$. Ao remover essa estação
e as partes radiais que não pertencem ao círculo, sobram as estações
$1, 6, 2, 5$ e $4$, portanto a linha circular passa por $5$ estações.
No segundo exemplo, aplicar o mesmo processo deixa $8$ estações na linha
circular.
Problema adaptado da OBI 2015, Fase 1:
\href{https://olimpiada.ic.unicamp.br/pratique/ps/2015/f1/metro/}{Metrô}.
\end{ProblemaAutor}
\end{document}

1
metro/output/1 Normal file
View File

@@ -0,0 +1 @@
5

1
metro/output/10 Normal file
View File

@@ -0,0 +1 @@
80

1
metro/output/11 Normal file
View File

@@ -0,0 +1 @@
125

1
metro/output/12 Normal file
View File

@@ -0,0 +1 @@
340

1
metro/output/13 Normal file
View File

@@ -0,0 +1 @@
111

1
metro/output/14 Normal file
View File

@@ -0,0 +1 @@
100

1
metro/output/15 Normal file
View File

@@ -0,0 +1 @@
299

1
metro/output/16 Normal file
View File

@@ -0,0 +1 @@
279

1
metro/output/17 Normal file
View File

@@ -0,0 +1 @@
340

1
metro/output/18 Normal file
View File

@@ -0,0 +1 @@
100

1
metro/output/19 Normal file
View File

@@ -0,0 +1 @@
503

1
metro/output/2 Normal file
View File

@@ -0,0 +1 @@
8

1
metro/output/20 Normal file
View File

@@ -0,0 +1 @@
788

1
metro/output/21 Normal file
View File

@@ -0,0 +1 @@
279

1
metro/output/22 Normal file
View File

@@ -0,0 +1 @@
340

1
metro/output/23 Normal file
View File

@@ -0,0 +1 @@
100

1
metro/output/24 Normal file
View File

@@ -0,0 +1 @@
501

1
metro/output/25 Normal file
View File

@@ -0,0 +1 @@
1001

1
metro/output/26 Normal file
View File

@@ -0,0 +1 @@
279

1
metro/output/27 Normal file
View File

@@ -0,0 +1 @@
340

1
metro/output/28 Normal file
View File

@@ -0,0 +1 @@
100

1
metro/output/29 Normal file
View File

@@ -0,0 +1 @@
501

1
metro/output/3 Normal file
View File

@@ -0,0 +1 @@
26

1
metro/output/30 Normal file
View File

@@ -0,0 +1 @@
1001

1
metro/output/31 Normal file
View File

@@ -0,0 +1 @@
279

1
metro/output/32 Normal file
View File

@@ -0,0 +1 @@
340

1
metro/output/33 Normal file
View File

@@ -0,0 +1 @@
100

1
metro/output/34 Normal file
View File

@@ -0,0 +1 @@
5011

1
metro/output/35 Normal file
View File

@@ -0,0 +1 @@
8711

1
metro/output/36 Normal file
View File

@@ -0,0 +1 @@
276

1
metro/output/37 Normal file
View File

@@ -0,0 +1 @@
104

1
metro/output/38 Normal file
View File

@@ -0,0 +1 @@
100

1
metro/output/39 Normal file
View File

@@ -0,0 +1 @@
5011

1
metro/output/4 Normal file
View File

@@ -0,0 +1 @@
71

1
metro/output/40 Normal file
View File

@@ -0,0 +1 @@
10001

1
metro/output/41 Normal file
View File

@@ -0,0 +1 @@
276

1
metro/output/42 Normal file
View File

@@ -0,0 +1 @@
104

1
metro/output/43 Normal file
View File

@@ -0,0 +1 @@
100

1
metro/output/44 Normal file
View File

@@ -0,0 +1 @@
5013

1
metro/output/45 Normal file
View File

@@ -0,0 +1 @@
11008

1
metro/output/46 Normal file
View File

@@ -0,0 +1 @@
10003

1
metro/output/47 Normal file
View File

@@ -0,0 +1 @@
4992

1
metro/output/48 Normal file
View File

@@ -0,0 +1 @@
12348

Some files were not shown because too many files have changed in this diff Show More