QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#40891#4240. Tree CircleslarryzhongWA 710ms110916kbC++171.5kb2022-07-27 10:06:342022-07-27 10:06:34

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 5ms
memory: 33364kb

input:

3
1 2
2 3
2
3 1 2 3
2 1 3

output:

2
4

result:

ok 2 number(s): "2 4"

Test #2:

score: 0
Accepted
time: 101ms
memory: 34336kb

input:

1000
251 1
610 251
1 621
610 534
617 1
27 617
54 534
251 435
610 984
1 850
291 610
251 461
51 27
376 617
461 310
36 850
36 351
456 461
461 171
456 294
949 294
688 1
833 610
174 534
435 841
841 60
556 251
251 423
655 376
688 188
610 448
456 549
894 841
65 688
65 522
421 435
382 65
894 613
617 789
880...

output:

275623202
374067774
494473471
420011499
643061355
554361044
755532440
289845686
45368764
527834219
925520205
659238238
433870012
469990636
657873561
852213216
966862980
542663190
982471669
458857532
478701698
947460452
451178245
603042191
422792889
685952031
417241570
548357718
223143158
101179924
9...

result:

ok 1000 numbers

Test #3:

score: 0
Accepted
time: 14ms
memory: 34544kb

input:

2000
1 1229
1229 743
7 1229
7 1684
293 1
1652 293
1458 743
293 1912
1912 1726
359 1458
372 743
772 293
756 1
409 1726
1652 921
433 1912
359 1515
1458 1897
1458 1439
409 952
1439 1877
1298 756
743 1055
1665 1897
1313 743
743 978
1515 1099
627 409
1665 1318
921 1859
293 39
627 1954
1665 646
1055 1584
...

output:

985661081
289663642
426379198
961782139
145012705
45028730
513933554
853668549
529541313
702845230

result:

ok 10 numbers

Test #4:

score: -100
Wrong Answer
time: 710ms
memory: 110916kb

input:

300000
1 265092
1 46487
265092 220364
124925 1
1 288590
265092 156898
280571 46487
184789 220364
280571 151321
280571 66880
86168 151321
151321 273555
46487 112431
124925 45049
1 66769
112431 36492
86168 137565
251083 66880
143467 66880
284087 1
280571 112916
112431 254872
238475 280571
180865 36492...

output:

425265333
650921663
28695301
191498362
567238295
582516091
948253770
242063171
597569966
190082202
-166495
521207503
-157281
570927982
122195019
889056495
982165169
-63602
70088500
224396729
443558073
770844475
992420728
129019298
66932621
140351691
402404024
748029355
324810833
847382658
975494158
...

result:

wrong answer 11th numbers differ - expected: '300000', found: '-166495'