QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#503779#4761. Card Hand Sortingxiaowuc1AC ✓121ms41444kbJava83.7kb2024-08-04 01:08:322024-08-04 01:08:34

详细

Test #1:

score: 100
Accepted
time: 38ms
memory: 39404kb

input:

4
2h Th 8c Qh

output:

1

result:

ok single line: '1'

Test #2:

score: 0
Accepted
time: 48ms
memory: 37944kb

input:

7
9d As 2s Qd 2c Jd 8h

output:

2

result:

ok single line: '2'

Test #3:

score: 0
Accepted
time: 35ms
memory: 39136kb

input:

4
2h 3h 9c 8c

output:

0

result:

ok single line: '0'

Test #4:

score: 0
Accepted
time: 43ms
memory: 39084kb

input:

9
2h 4h 3h 4c 7c 6c Ts Ks Qs

output:

3

result:

ok single line: '3'

Test #5:

score: 0
Accepted
time: 49ms
memory: 39452kb

input:

20
2h 2d 2c 2s 6h 6d 6c 6s 4h 4d 4c 4s 5h 5d 5c 5s 3h 3d 3c 3s

output:

12

result:

ok single line: '12'

Test #6:

score: 0
Accepted
time: 52ms
memory: 41444kb

input:

10
5s 9s 8s Ts 4s 5h 9h 8h Th 4h

output:

4

result:

ok single line: '4'

Test #7:

score: 0
Accepted
time: 63ms
memory: 37580kb

input:

9
Ac As Ah Kc Ks Kh Qc Qs Qh

output:

4

result:

ok single line: '4'

Test #8:

score: 0
Accepted
time: 45ms
memory: 37932kb

input:

8
2c 9c As Qs Jh Qh Kd 9d

output:

0

result:

ok single line: '0'

Test #9:

score: 0
Accepted
time: 49ms
memory: 39156kb

input:

12
Td 9d 8d 2h 3h 4h 4s Ts As Jc Qc Kc

output:

0

result:

ok single line: '0'

Test #10:

score: 0
Accepted
time: 59ms
memory: 38004kb

input:

12
5c 6c 7c Ts 9s 8s Jd Td 9d Qh Kh Ah

output:

0

result:

ok single line: '0'

Test #11:

score: 0
Accepted
time: 38ms
memory: 39820kb

input:

1
As

output:

0

result:

ok single line: '0'

Test #12:

score: 0
Accepted
time: 90ms
memory: 39988kb

input:

52
2s 3s 4s 5s 6s 7s 8s 9s Ts Js Qs Ks As 2h 3h 4h 5h 6h 7h 8h 9h Th Jh Qh Kh Ah 2d 3d 4d 5d 6d 7d 8d 9d Td Jd Qd Kd Ad 2c 3c 4c 5c 6c 7c 8c 9c Tc Jc Qc Kc Ac

output:

0

result:

ok single line: '0'

Test #13:

score: 0
Accepted
time: 99ms
memory: 39476kb

input:

52
7s 7h 7d 7c Qs Qh Qd Qc 3s 3h 3d 3c As Ah Ad Ac 2s 2h 2d 2c 5s 5h 5d 5c Ks Kh Kd Kc 4s 4h 4d 4c Js Jh Jd Jc 9s 9h 9d 9c Ts Th Td Tc 6h 6d 6c 6s 8h 8d 8c 8s

output:

40

result:

ok single line: '40'

Test #14:

score: 0
Accepted
time: 34ms
memory: 37900kb

input:

5
As Qh 6h 8s Ks

output:

1

result:

ok single line: '1'

Test #15:

score: 0
Accepted
time: 53ms
memory: 37532kb

input:

10
Kc Js 9d 6s 6d 3h 5d 7h 7s 9c

output:

4

result:

ok single line: '4'

Test #16:

score: 0
Accepted
time: 56ms
memory: 38976kb

input:

15
4s 4c Td 6c 2c Js 5h Jc Ac 7d Ks Ts 5d 6s 7s

output:

7

result:

ok single line: '7'

Test #17:

score: 0
Accepted
time: 61ms
memory: 38564kb

input:

20
Kh 2d Jd 3d Ah 5s 3c 2c Jh Jc Js 6c 5d Kd 9c 4s 9h 2h As Qs

output:

11

result:

ok single line: '11'

Test #18:

score: 0
Accepted
time: 75ms
memory: 39940kb

input:

25
2s As Kc 8h Jh 5s 6s Kd 7d 8d 3c 9d 3s 4d Ah Jc Tc Qd 9c 2c 6c 9s Ks 6d 5d

output:

14

result:

ok single line: '14'

Test #19:

score: 0
Accepted
time: 70ms
memory: 40260kb

input:

30
Ac Jd Js Ah 8h 8c Qh 6d 3c 4s Kc Jh Jc 3h 3d 4c 6c 2h Qc 4d As Ts Th 7s 7h 2d 2c Qs Ad 6s

output:

18

result:

ok single line: '18'

Test #20:

score: 0
Accepted
time: 93ms
memory: 39204kb

input:

35
4h 6d 8d 3d 9d 5s 5h Qs 9c Ks Td 9s 6h 3s Qh 6c Jd 7h Jh Qd 2s Tc 7d Ad 3c Jc 7c Kh 6s 4c 2c 7s 9h 2h 8c

output:

21

result:

ok single line: '21'

Test #21:

score: 0
Accepted
time: 86ms
memory: 40680kb

input:

40
7h 5d 3h Kd Ks 7d 2s As 6d Qh Jh 3c 5h 4s 6c 8c 2c 6s Qc 3d 4h 6h 8h 8s Ad 9c Jd 9h Kc Qd Tc 9d 7s 9s Js 2h Kh Th Jc Td

output:

26

result:

ok single line: '26'

Test #22:

score: 0
Accepted
time: 93ms
memory: 38920kb

input:

45
Ts Kd 5d 7h Th Kc Qs 9c 8h 2c 3c Jc As 5c 2d Ah Qd Ac Td 9h Tc 5s Jd 8s 6d Qh 9d 4s 7d Ks 4h 6c Kh 3d 8c 2s 8d 3s 3h 4d Qc 4c 5h Ad 2h

output:

33

result:

ok single line: '33'

Test #23:

score: 0
Accepted
time: 98ms
memory: 40592kb

input:

50
8d 2d 2h 9h 7h 9d 3h 3c 7c Jd 2c 8s Tc Ad 3s Td 8c 5d 4c 4d 2s Ks 4h Ac Ah 6s 5c Kh 6h 5s Jc As 7s 6c Qd Ts Qc Th Qs Jh 6d 9c Kc Js 4s Qh 7d 5h 8h 3d

output:

35

result:

ok single line: '35'

Test #24:

score: 0
Accepted
time: 95ms
memory: 38852kb

input:

52
Ad Ks 2d Kd 4h Qc 7s Ac 8s Kc 5s 3c 5h 8c 2h 3s Jd 2s 7c 5d Tc 8d 3h Qs 3d 9s 9h Ah 6d 8h 7h 9d 5c Jh Th Kh 6c Qh 4s Qd Ts 6h 6s 2c Td 4d 7d As 4c Jc Js 9c

output:

38

result:

ok single line: '38'

Test #25:

score: 0
Accepted
time: 93ms
memory: 40576kb

input:

52
Kd 6s 3h Qc 7s 4s 8h 3d 5d Jc 9s Ts 5c 2c 2d Th Js 6c Jd Ks 5h 6h Qh Ad Tc 4c 9c 3c 5s Qs Kh Qd 7h 8s Kc 4d 8d 9d 2h Td 9h 6d 8c 3s Ah 7d 4h As 7c Ac Jh 2s

output:

36

result:

ok single line: '36'

Test #26:

score: 0
Accepted
time: 108ms
memory: 40944kb

input:

52
5h 9c As Jd Ts Jc 5s 5d Qh 9s Qd Kc 2h 4d 8h Tc 6s Td Jh 3h 3c 6h 7c 6c 7h 4h 2c 7s 4s Ad 2d Ah 8c 8s Th 5c 2s 6d Qs 3d 7d 8d Ac Js 9d Kd 3s Qc Kh Ks 9h 4c

output:

36

result:

ok single line: '36'

Test #27:

score: 0
Accepted
time: 88ms
memory: 40492kb

input:

52
6c 3c 2d 4s Qh As Js Kh Tc 5d Qs Qc 6d Ac 4c Ad 8h 8c 3h 9h 7s 2s 5h Kc Kd Qd 8d 5s Th 2c 7d 4d 7c 9d Jh Jc 4h Ks Td 6s 6h 5c 3s 7h 9c 2h Ts 3d 9s 8s Ah Jd

output:

36

result:

ok single line: '36'

Test #28:

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

input:

51
Ts 9h 6c Qc 9s Qh 7h Kh 2h Jh Ks 8c 9d 5s 6s Th Ac 2s Jd Td 3d Kc Jc Tc 4h 5d Kd 4d 6d 2d As 8h 7d 9c 8d 4c 7s 3s 8s 5h 2c 3h Js Qd 6h Ad 3c 5c Qs 7c 4s

output:

35

result:

ok single line: '35'

Test #29:

score: 0
Accepted
time: 106ms
memory: 39744kb

input:

50
2c Jd 5c Qc 4s 6h Qs Kd Th Kc 3h Jc 6c 3d 8s Jh 5s 4d 8h Ks 2s 4h 6s 7s Js 3c 8d 9s 2d 5d 4c Ad 8c As 7c 9h 6d 3s Td Ts 5h 7d Qh 9d Tc 2h Kh 9c Ac Qd

output:

34

result:

ok single line: '34'

Test #30:

score: 0
Accepted
time: 110ms
memory: 40176kb

input:

51
8d Qs Jd Ac Th 3h 3c 9s 9d 9h Qh 5c Qd 6d 4s 8s 2c As Ah 8h 7d 8c Ts 6h Jh 3s 9c 6c 3d 2s Ad Kh 4h 7c 2h Js 7h Tc Jc 4d Ks Kc 6s 5s Td 5h Qc Kd 2d 4c 7s

output:

37

result:

ok single line: '37'

Test #31:

score: 0
Accepted
time: 86ms
memory: 39368kb

input:

51
Js Jc 5c Jh 5d Td 8d 4h 7h 5h 7c 9c 8s Ts As Kd Jd 2c Ac 5s 3d Th 3s Ad 9d Kh 9s Tc 4c 4d 4s 2h 9h 6c 6d 8h Qs 7d 6h 2d Ah Kc 7s 2s Qd Ks 3h Qh Qc 8c 3c

output:

36

result:

ok single line: '36'

Test #32:

score: 0
Accepted
time: 102ms
memory: 39676kb

input:

48
7c 7d Ah Jh 7s 2s Td 5h 3c Ac Ks Jd 8s 2c Th Qc 4d Js 6h 5c 6d Qd 7h 4h 2d 4c 2h 6s 9h 3s 3h 4s Ad Jc 8c Ts 8h Kd Tc Kc 5s Kh 8d Qh 9s 3d 6c Qs

output:

34

result:

ok single line: '34'

Test #33:

score: 0
Accepted
time: 121ms
memory: 40984kb

input:

52
7h As 5s 7s 4h 8h Tc 2d 2h Ad 6c 3c Kd Ah 8s Qd Th Jc Jd 7c Kh 7d Td 6d 3s 9c 8c Qs 2s 8d Jh Qh Ac 5d 4s 9h Js 6h 9d 5c 5h 3d Ks 6s 2c 4d 4c 9s Ts Qc 3h Kc

output:

35

result:

ok single line: '35'

Test #34:

score: 0
Accepted
time: 105ms
memory: 40696kb

input:

52
8s 2s 5c Jh 5h 5s 8c Qh Tc 3h Ah Kc 9h Js Th Ks 7s Jd 6s 4h 6h 7d 6c 4d 9d 7h Kh 5d 4s Ts Td 6d 8h Kd 9c Qc Qd Ad 3s 3c 9s Qs 7c 2c 3d Ac 8d As 2d 4c Jc 2h

output:

36

result:

ok single line: '36'

Test #35:

score: 0
Accepted
time: 103ms
memory: 40092kb

input:

50
5s Qd Ks 7h 3h 7s Qs Qc Js 9d 4s Ad 7c 2c 8s 4h Kc 3c 6s 7d Th 6c Ah Td 9c Jd Ts 8c 5c Jh Jc 6h 4c Kd As 5h 3s 4d Ac 8d Kh 8h 5d 3d 9h 2d Tc Qh 6d 9s

output:

34

result:

ok single line: '34'

Test #36:

score: 0
Accepted
time: 95ms
memory: 40316kb

input:

51
Qd Ts 6h 4s Ac Th 9d 2h Ah 5h 3h 9c 5s 7h 2s Kc 9s Qh 6c Kh As Td Jc Qs 5c 7c 8s 7s 8c Jh 3d 3c Ad Qc Js Kd 4c Jd 3s 7d 2c 5d 8h 8d 4h 4d 2d Ks 6s Tc 6d

output:

33

result:

ok single line: '33'

Test #37:

score: 0
Accepted
time: 87ms
memory: 39968kb

input:

49
Qd Jc 7c 4h 6d 8h 8s 2d 3c Ts 3d 5c Jh 8c Kc 6c 4c Qh 7d 9s 7s Ac 5d 2c 4d Kh 2s Ks Qc Ad 9c Qs 3h 9d 7h Td Jd 2h Th 4s Js 9h Ah 8d 6s 5s As 6h 5h

output:

34

result:

ok single line: '34'

Test #38:

score: 0
Accepted
time: 102ms
memory: 40560kb

input:

48
5d 5s 9h Ks Ts 6h 7h 9s Ah 8h Th 3h 6s Jd Js 5h 3d 4c Kd Jh 3s Ac 8d Kc 7c 8c 6c Kh Jc 2s 9d 4h 5c 4s Qs 6d Td 2c Ad As 7d 8s Qd 9c Tc 7s 3c Qc

output:

32

result:

ok single line: '32'

Test #39:

score: 0
Accepted
time: 102ms
memory: 40596kb

input:

49
Jc 3s 9c Jh Js Ks 4d 5d 4h 9h 2c Kh 8c Th 6c 2s 6s Ts 8d Qd 7c Ac 4c 8h As Qh 4s 9d Tc 5h 7d Kc 5c Kd 8s 7h 2d Ah 5s Ad 9s Td Jd 7s 3h 3c 6d 3d Qc

output:

34

result:

ok single line: '34'

Test #40:

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

input:

51
Qs 4c 6s 2d Ks Tc Jd Kd 5d 7d 5s Js 9d Ac 7c 8h 3c 6d 6h 7h 2h Ts 8s Th Kh 3s Qh 5c 4h 3d Td Ah Qd 3h 9h 2s As 8d 4d 4s 8c 5h Ad 6c 9c Jc 2c 7s 9s Kc Qc

output:

35

result:

ok single line: '35'

Test #41:

score: 0
Accepted
time: 103ms
memory: 39992kb

input:

48
9d Ts Td 7h Jh 4d 9s 7s 3c 3s 2h 8d 8h 5s Jd 3h Qc Kh 4h Ks Kc 3d 2d 7d Ac 8s Ah 5c Qs 5d 4c 6h Tc 6c Th Ad Qh 7c 9h As 6s 8c 9c 6d 2c 2s Kd Js

output:

33

result:

ok single line: '33'

Test #42:

score: 0
Accepted
time: 96ms
memory: 40592kb

input:

48
4s 3s 6h Qs Qc 7c 9d As Ks 9s Qd 2d Kd Kc Ts Js 3c 8h 7d Ad 6c 5s 6d 9c Td Qh 8s Ac 5h 7h 8c Jc 2s 4c Ah 7s 3h 8d 2c 6s Jh 2h 5d Jd 5c 9h 4h 3d

output:

34

result:

ok single line: '34'

Test #43:

score: 0
Accepted
time: 113ms
memory: 39620kb

input:

49
Jd 4h 9h Js Td 7h 2c 8h 8c Ac As 7s Th Ah Jh 4c Qd 7c Qs 6d Ad 6c Ks 4d Ts Kh Jc 5c Qh 3c Qc 2d Kc 5d 2s 6h Tc 9s 3d 3s 5s 5h 4s 8d 6s 9d 2h Kd 9c

output:

33

result:

ok single line: '33'

Test #44:

score: 0
Accepted
time: 112ms
memory: 40080kb

input:

52
Ts 5s Tc 9s 4d 4c 8h 3d 5d 7d 2h Js 7h 9h 9d 4h Jc 2d 2s 3h Ah 2c Ac 8s 6d Kd Td Qs 3c Kc As Qc 3s 5h 7c 6h 9c Jh 6c Jd 5c Kh 4s 8d Th Ks 6s Qd Qh Ad 7s 8c

output:

36

result:

ok single line: '36'

Test #45:

score: 0
Accepted
time: 98ms
memory: 40684kb

input:

49
Qd Jh 6s Jc Kc 7d Qs 9c 7c 3h 7s As Kd Td Ah 2d 4s 2c 5c 6h 5s Jd 3d Js 5d Ks 8s Qh 9d 4h Ad 9h 4d Tc 7h 3s 8d Ac 2s 4c Th 5h 8c Ts 3c 9s Kh 2h 6c

output:

34

result:

ok single line: '34'

Test #46:

score: 0
Accepted
time: 109ms
memory: 41176kb

input:

49
7d 9s Ks 4h 8d Kh Ts 7s 9d 3h 9h 6h 5s 6d 2c Ac 8s 2d 4d 5c Ah As 3d 3s 3c Ad Qh 5h 4c 5d Qd 9c 2s Jh Jc 8h Jd Qc 6s 7c Kd Th Tc Js Kc 2h 7h 8c Qs

output:

34

result:

ok single line: '34'

Test #47:

score: 0
Accepted
time: 99ms
memory: 41444kb

input:

50
6h 3s 4s 6c 7s 5c 9h 5d 2s Ts Th Kh 8s Qs Td Qc Kd 6d 3c 6s Kc 3h 7d 5h As 7c 4d Jd 4h Qh Js Ac Ks 4c 2h Jh 7h 2c 8d 9c 3d 9s Tc 8c 2d 9d Jc Ah Qd Ad

output:

34

result:

ok single line: '34'

Test #48:

score: 0
Accepted
time: 97ms
memory: 40064kb

input:

51
8s 4d As 7d 9s 7c Tc 7s 9h 4h 8c 3c 5s 6c Kc Ad Kh Th Td 5c Jd 8h Jh 6h 7h Ah 3h 6s 4s 6d 2d 5d 3s 4c Qs Ac 8d Ts Js Qh 9c Kd 3d 2c 9d 2h Qc Ks Qd 2s Jc

output:

35

result:

ok single line: '35'

Test #49:

score: 0
Accepted
time: 94ms
memory: 39096kb

input:

51
7s Ks Kh Js 7d Jc 2d 8c 9h Qh 3h 6c Ad 9s 3c 6d Qc 2c Jh Th 6s 8d Jd Qd 6h 2s 5c 5s 4c Tc 2h 8h Kc Td 5h 4s 7c 9d 7h 9c Ah Kd 5d 8s 3d Ac As 4h Qs Ts 4d

output:

35

result:

ok single line: '35'

Test #50:

score: 0
Accepted
time: 99ms
memory: 38912kb

input:

52
4c 3c 5h Kd 8s 9c 7s Jd 9s 4s Ks As 6c 7c Js Qd 5d Th 9d 3d 8h 9h 6s Td 6h 8c 7d 3s Jh 8d 5s 2s 3h Kh 4h Ac Qc 2d 5c Ad 4d Kc Qs Tc Qh 2c 7h 6d 2h Jc Ah Ts

output:

37

result:

ok single line: '37'

Test #51:

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

input:

52
3c 8d Js Jc Ks As 9d 2c 5h Ts 6h 4h Kc 9s 6c Td 3h 2s Qh Ac 9c 4c 5s Ad Jh 5d 2d 3s Kd Ah 7d Jd 7s 7h Qc 7c Tc 8s 6d 8h 9h Kh 8c Qd Th Qs 6s 2h 4s 5c 4d 3d

output:

37

result:

ok single line: '37'

Test #52:

score: 0
Accepted
time: 88ms
memory: 40164kb

input:

50
Jc Ks 7c Td Kd Qh 4d Ah 7h 2d Th 8d 3h Ad Tc 6c Qs 3d 7s Ts 2s 9s Kc 9d 4s 2c 5d 5s 7d 2h 3c 5h 3s 6s Jd 4c Kh 5c 6h Ac 8c 9c As Js Qd Qc Jh 9h 8h 6d

output:

33

result:

ok single line: '33'