QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#848620#2515. Graph Cardsahihi1234AC ✓20561ms154412kbC++142.6kb2025-01-08 22:57:492025-01-08 22:57:49

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 22ms
memory: 49400kb

input:

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

output:

1

result:

ok single line: '1'

Test #2:

score: 0
Accepted
time: 13ms
memory: 49416kb

input:

2
2
4 1 2 2 3 3 1 1 4
5 1 2 2 3 3 1 2 4 2 5
3
9 1 2 2 5 5 7 7 6 6 3 3 1 2 4 7 9 9 8
9 1 4 4 2 2 3 3 5 5 7 7 6 6 4 7 8 8 9
9 1 2 2 5 5 4 4 1 4 7 7 8 8 6 8 9 5 3

output:

2
2

result:

ok 2 lines

Test #3:

score: 0
Accepted
time: 6079ms
memory: 97512kb

input:

30
332526
3 3 2 3 1 2 1
3 2 3 3 1 1 2
3 1 3 1 2 3 2
3 3 2 2 1 1 3
3 2 1 2 3 1 3
3 1 3 1 2 3 2
3 1 2 2 3 3 1
3 2 1 2 3 1 3
3 3 1 3 2 1 2
3 1 3 1 2 3 2
3 1 3 3 2 2 1
3 1 2 2 3 3 1
3 3 1 3 2 1 2
3 2 1 2 3 1 3
3 3 2 2 1 1 3
3 1 2 1 3 2 3
3 1 2 1 3 2 3
3 2 3 2 1 3 1
3 1 2 1 3 2 3
3 3 1 1 2 2 3
3 1 3 1 2 ...

output:

1
4
5
89
93
242
628
1575
3401
5703
7718
8888
9258
9355
9356
9203
9211
89
239
648
1739
4541
10352
19037
27089
31567
33030
33068
32480
31503

result:

ok 30 lines

Test #4:

score: 0
Accepted
time: 6130ms
memory: 84844kb

input:

30
333333
3 2 1 2 3 3 1
3 1 2 3 2 3 1
3 3 2 1 3 1 2
3 2 3 2 1 3 1
3 2 3 2 1 1 3
3 1 2 3 2 3 1
3 3 1 2 1 3 2
3 1 3 1 2 3 2
3 1 3 2 3 1 2
3 2 1 3 2 3 1
3 2 3 1 2 1 3
3 3 1 1 2 3 2
3 3 2 3 1 1 2
3 2 1 3 1 3 2
3 3 2 1 2 3 1
3 3 2 1 2 1 3
3 2 3 2 1 1 3
3 1 2 3 2 3 1
3 3 1 1 2 3 2
3 1 3 1 2 2 3
3 1 2 3 2 ...

output:

1
2
5
13
33
89
240
653
1771
4753
11868
24982
40524
51128
54690
54119
52143
49848
47551
45441
43471
41664
40000
38461
37037
35714
34482
33333
32258
31250

result:

ok 30 lines

Test #5:

score: 0
Accepted
time: 20561ms
memory: 154412kb

input:

30
2
500000 12446 494050 179161 216388 282442 232792 428247 130742 87062 493860 276791 469755 342468 58973 93535 429405 5662 112197 121541 62083 28611 427877 376918 349780 372239 58010 457751 308686 448844 473714 151350 480692 152372 415617 311966 298916 302690 200753 75481 396263 318635 79619 39930...

output:

1
2
2
1
1
2
2
1
1
2
2
1
1
2
2
1
1
2
2
1
1
2
2
1
1
2
2
1
1
2

result:

ok 30 lines

Test #6:

score: 0
Accepted
time: 193ms
memory: 86508kb

input:

1
4
240000 1 2 2 3 3 4 4 7 1 5 2 6 7 8 8 9 9 10 10 13 7 11 8 12 13 14 14 15 15 16 16 19 13 17 14 18 19 20 20 21 21 22 22 25 19 23 20 24 25 26 26 27 27 28 28 31 25 29 26 30 31 32 32 33 33 34 34 37 31 35 32 36 37 38 38 39 39 40 40 43 37 41 38 42 43 44 44 45 45 46 46 49 43 47 44 48 49 50 50 51 51 52 52...

output:

2

result:

ok single line: '2'