QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#590532#7181. Graph CutsMaMengQiWA 127ms284224kbC++202.7kb2024-09-26 02:04:132024-09-26 02:04:14

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 9740kb

input:

4 5
1 2
1 3
1 4
2 3
2 4
10
+ 1
+ 2
?
?
?
?
?
- 2
?
?

output:

5
4
3
2
0
1
0

result:

ok q=10

Test #2:

score: 0
Accepted
time: 4ms
memory: 3644kb

input:

0 0
0

output:


result:

ok q=0

Test #3:

score: 0
Accepted
time: 5ms
memory: 5560kb

input:

0 0
1
?

output:

0

result:

ok q=1

Test #4:

score: 0
Accepted
time: 12ms
memory: 9964kb

input:

1000 2000
1 50
1 88
331 1
1 352
1 497
2 32
2 282
550 2
989 2
334 3
3 665
4 38
4 69
4 343
4 451
589 4
917 4
89 5
5 162
675 5
681 6
7 22
127 7
7 592
7 672
787 7
8 310
107 9
9 137
184 9
9 244
378 9
446 9
9 658
883 9
65 10
75 10
414 10
10 468
686 10
245 11
269 11
11 386
403 11
493 11
394 12
493 12
565 1...

output:

208
1990
1958
779
1475
1474
854
879
1928
1917
847
1187
1848
1043
657
1768
1741
1304
837
836
852
851
89
1183
949
1421
1696
340
1190
278
1182
896
895
1968
743
846
754
1880
1562
1422
972
1561
1560
1877
1857
1838
1557
1556
853
1789
1788
1648
426
1851
1956
1783
1695
1279
667
1797
1796
1076
1075
1993
1860...

result:

ok q=100000

Test #5:

score: 0
Accepted
time: 127ms
memory: 284224kb

input:

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

output:

446

result:

ok q=100000

Test #6:

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

input:

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

output:

377
433
443
427
412
350
437
400
355
436
383
301
295
289
446
420
382
401
393
391
384
415
373
369
346
345
337
447
429
445
444
442
441
440
439
438
435
434
431
430
428
426
425
424
423
422
421
419
417
416
414
413
411
410
409
408
407
404
399
397
396
395
418
392
389
388
381
394
380
379
375
371
370
368
367
...

result:

ok q=100000

Test #7:

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

input:

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

output:

180
186
447
418
380
355
307
439
381
443
318
305
392
377
433
376
434
429
368
360
345
340
333
323
342
306
304
396
298
328
313
293
281
271
413
267
261
253
236
237
224
324
287
223
221
349
211
205
193
189
399
279
395
420
373
361
365
445
410
414
403
346
322
317
290
242
299
320
411
239
227
222
389
212
196
...

result:

ok q=100000

Test #8:

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

input:

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

output:

0
141
127
441
417
379
414
375
330
292
241
309
240
235
294
220
217
191
189
177
264
188
151
120
428
369
303
290
203
111
99
93
84
32
169
202
118
353
312
320
259
30
27
396
302
378
29
20
9156
342
9155
286
156
9154
391
185
446
445
444
443
442
440
439
438
437
436
435
434
433
432
431
430
429
427
426
425
424...

result:

ok q=100000

Test #9:

score: 0
Accepted
time: 42ms
memory: 19068kb

input:

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

output:

0
0
0
0
0
0
0
0
379
102
81
33251
33250
364
378
33249
33248
33247
33246
191
184
138
33245
33244
322
288
33243
393
33242
33241
281
33240
33239
33238
416
95
33237
33236
33235
33234
33233
33232
371
437
237
33231
33230
33229
33228
404
308
301
211
339
166
131
111
101
43
18678
18677
310
255
18676
18675
186...

result:

ok q=100000

Test #10:

score: -100
Wrong Answer
time: 39ms
memory: 16952kb

input:

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

output:

0
0
0
0
173
62553
62552
62551
62550
62549
62548
62547
439
62545
62544
62543
62542
62541
48
20678
189
20677
20676
20675
20674
20673
57
20672
20670
20669
20668
20667
20666
20665
20664
20663
20662
20661
20660
274
20659
20658
20657
20656
20655
20654
20653
20652
20651
20650
20649
20648
20647
20646
20645
...

result:

wrong answer Edge exists, but not found