QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#317131#8169. R-Connected Componentsucup-team2818#WA 8ms3820kbC++141.2kb2024-01-28 16:10:552024-01-28 16:10:55

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3804kb

input:

3
1
2
3

output:

1
2
inf

result:

ok 3 tokens

Test #2:

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

input:

100
971962039
377418539
436722941
974460973
408831757
674955527
838941797
566099869
224191573
85539073
544795513
157335071
243499759
907206901
570172403
871918511
594778897
773009569
9371917
23810669
169348601
804358351
78636461
382633897
182514781
846151963
274168729
929192339
91532527
172531889
18...

output:

inf
inf
1
1
1
inf
1
1
1
1
1
inf
inf
1
inf
inf
1
1
1
1
1
inf
1
1
1
inf
1
inf
inf
1
inf
inf
inf
inf
1
inf
inf
inf
1
inf
inf
inf
inf
inf
1
1
inf
inf
1
1
inf
inf
1
1
inf
inf
inf
inf
inf
1
1
inf
inf
1
1
inf
1
1
1
1
inf
inf
1
inf
inf
inf
inf
inf
1
1
1
1
inf
1
1
1
inf
inf
1
inf
inf
1
inf
1
inf
1
1
inf
inf
1

result:

ok 100 tokens

Test #3:

score: 0
Accepted
time: 6ms
memory: 3760kb

input:

100
145332973
48696341
806778307
222052531
641666023
541840597
635341691
814013
661659811
428891707
81656189
417810353
889550023
634550447
905470561
429756883
249889429
195597113
906475553
913878767
953103803
192400903
483162293
643055177
137120771
748444841
701614733
452585411
367582519
564268909
6...

output:

1
1
inf
inf
inf
1
inf
1
inf
inf
1
1
inf
inf
1
inf
1
1
1
inf
inf
inf
1
1
inf
1
1
inf
inf
1
inf
inf
1
1
inf
1
1
1
1
inf
1
1
inf
1
inf
1
inf
inf
inf
1
inf
1
inf
inf
inf
inf
inf
1
inf
inf
1
1
inf
1
inf
1
1
inf
inf
1
inf
inf
inf
1
1
inf
1
1
inf
inf
inf
inf
1
1
1
1
inf
inf
inf
1
1
1
inf
1
inf
inf
1
1
1
inf

result:

ok 100 tokens

Test #4:

score: 0
Accepted
time: 8ms
memory: 3752kb

input:

100
999999937
999999929
999999893
999999883
999999797
999999761
999999757
999999751
999999739
999999733
999999677
999999667
999999613
999999607
999999599
999999587
999999541
999999527
999999503
999999491
999999487
999999433
999999391
999999353
999999337
999999323
999999229
999999223
999999197
999999...

output:

1
1
1
inf
1
1
1
inf
inf
1
1
inf
1
inf
inf
inf
1
inf
inf
inf
inf
1
inf
1
1
inf
1
inf
1
1
inf
1
inf
inf
1
inf
1
inf
inf
inf
inf
inf
1
1
1
1
inf
inf
1
1
1
1
inf
1
inf
inf
1
1
1
1
1
inf
inf
inf
1
1
inf
inf
1
1
1
inf
1
1
1
inf
1
inf
inf
1
inf
1
1
1
inf
inf
inf
1
inf
inf
1
1
inf
inf
1
inf
inf
1
inf
inf

result:

ok 100 tokens

Test #5:

score: 0
Accepted
time: 2ms
memory: 3744kb

input:

100
315798823
138076441
16013527
105333433
88400579
81370909
61828003
35409677
1148723
553787863
27501853
362120687
51345997
55496489
317656091
244618859
93709579
179950021
391542071
892937473
51911033
520441661
257008447
808078441
9461321
313593769
230895449
409677377
957316117
263495411
185463989
...

output:

inf
inf
inf
1
inf
inf
inf
1
inf
inf
inf
inf
1
1
inf
inf
inf
inf
inf
inf
1
inf
inf
1
inf
inf
1
1
1
inf
inf
inf
1
inf
inf
inf
inf
inf
1
inf
inf
inf
1
1
inf
1
inf
inf
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
inf
1
inf
1
inf
1
inf
inf
inf
1
inf
inf
inf
inf
inf
inf
inf
1
inf
inf
inf
...

result:

ok 100 tokens

Test #6:

score: -100
Wrong Answer
time: 5ms
memory: 3816kb

input:

100
33396841
155925169
725337061
54724081
120942061
666015877
383161
901555513
883456729
24196561
743043373
12241
73396613
329229533
416642297
284838833
539493529
231009601
832841881
143815537
223173721
265406201
236882881
22071701
163814401
90810781
563712997
528397937
113699569
388557821
19246817
...

output:

5779
12487
1
1
1
1
619
1
29723
4919
1
1
1
1
1
1
23227
15199
28859
1
14939
1
15391
1
12799
1
1
1
10663
1
1
1
1
19739
1
1
1
1
1
1
29131
10079
719
12703
1
9227
1
1
23279
6359
27107
3163
1
1
29303
31
25171
1
1
28411
7867
19267
1
487
30391
1
3803
22003
23687
1
1
1
12539
28571
1
1
1667
18211
30467
30223
1...

result:

wrong answer 1st words differ - expected: '33396841', found: '5779'