QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#57862#2918. Tree Number GeneratorZhaoZiLongWA 8ms22416kbC++113.3kb2022-10-23 15:13:352022-10-23 15:13:38

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 18136kb

input:

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

output:

0
0
0
0

result:

ok 4 lines

Test #2:

score: 0
Accepted
time: 3ms
memory: 16256kb

input:

3 10 5
1 2
2 3
0
0
0
1 3
3 1
2 2
2 3
2 1

output:

0
0
0
0
0

result:

ok 5 lines

Test #3:

score: 0
Accepted
time: 3ms
memory: 22416kb

input:

2000 2 2000
937 1471
1672 937
356 1672
976 356
1257 356
1503 1257
783 1503
1783 937
1284 976
1955 1503
802 1257
583 1471
526 356
701 1783
393 1955
307 1955
386 1955
1070 937
1724 802
1397 1724
1140 937
422 526
1941 1955
1638 937
1469 526
1800 526
1035 1800
1009 1140
1195 1800
142 1471
1225 1469
1524...

output:

0
1
1
1
0
0
1
0
0
1
0
1
0
0
1
1
0
0
1
1
1
1
1
0
0
0
1
0
1
1
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
1
0
1
0
0
0
0
0
1
0
1
1
0
0
0
0
1
1
1
1
1
0
0
1
1
1
0
1
1
1
0
0
1
1
1
1
0
0
0
1
0
1
0
0
1
1
1
0
1
1
0
1
0
1
0
0
1
0
1
0
0
1
1
0
1
1
1
1
0
0
0
1
0
0
0
0
1
1
0
1
1
0
1
1
0
1
1
0
0
0
1
1
0
0
1
...

result:

ok 2000 lines

Test #4:

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

input:

2000 1000 2000
1664 1028
763 1664
1541 1028
1544 1664
69 1544
1473 1541
475 1541
1551 1541
579 1473
262 475
1777 475
1916 475
391 763
807 1028
1357 1028
1682 69
345 1544
234 1541
63 391
480 807
1762 1544
306 1916
1436 1777
891 391
1852 306
523 1852
264 475
313 306
1139 391
1792 69
1604 69
398 313
10...

output:

263
429
976
56
31
940
168
28
487
658
273
218
944
664
498
705
709
490
61
931
421
664
632
538
876
282
145
61
430
984
589
436
780
641
69
126
625
208
629
603
566
57
355
843
705
781
514
898
804
290
366
642
429
899
716
466
371
620
252
606
690
500
412
226
495
380
61
580
805
132
423
845
618
862
924
729
637
...

result:

ok 2000 lines

Test #5:

score: -100
Wrong Answer
time: 8ms
memory: 16304kb

input:

2000 1000000 2000
676 154
686 154
357 154
187 676
299 686
1508 357
1515 1508
972 686
105 357
748 1515
1711 686
1692 154
1869 299
1017 187
829 1017
809 1515
1505 676
383 1515
1002 972
1448 829
1657 1515
1824 1508
1271 1711
545 1515
1099 748
1255 748
556 545
388 1017
1290 357
992 1824
66 1017
1812 972...

output:

911946
658749
941314
251735
719871
241911
734055
143108
569168
899637
173402
264918
271418
632775
991506
402910
517268
914587
379978
462220
622382
658742
329239
43729
56506
192359
410979
57536
866374
142798
124989
947854
413121
183893
602943
488815
292373
183960
602947
199025
301900
603305
260397
64...

result:

wrong answer 101st lines differ - expected: '89', found: '$89'