QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#40885#4240. Tree CircleslarryzhongRE 97ms21444kbC++171.5kb2022-07-27 10:03:052022-07-27 10:03:06

详细

Test #1:

score: 100
Accepted
time: 3ms
memory: 20236kb

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: 97ms
memory: 21444kb

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: 15ms
memory: 19708kb

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
Dangerous Syscalls

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:


result: