QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#316102#8169. R-Connected Componentsucup-team932#RE 13ms3676kbC++233.7kb2024-01-27 17:23:472024-01-27 17:23:47

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3
1
2
3

output:

1
2
inf

result:

ok 3 tokens

Test #2:

score: 0
Accepted
time: 9ms
memory: 3568kb

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: 9ms
memory: 3672kb

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: 13ms
memory: 3624kb

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: -100
Runtime Error

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:


result: