#APL(NARS), 9 chars, 18 bytes
{⍵≡⍦,⍨∪⍵}
test:
f←{⍵≡⍦,⍨∪⍵}
f 7,13,9,2,10,2,4,10,7,13,4,9
1
f 77,31,5,31,80,77,5,8,8
0
f 2,4,6,4,4,4
0
#APL(NARS), 9 chars, 18 bytes
{⍵≡⍦,⍨∪⍵}
test:
f←{⍵≡⍦,⍨∪⍵}
f 7,13,9,2,10,2,4,10,7,13,4,9
1
f 77,31,5,31,80,77,5,8,8
0
f 2,4,6,4,4,4
0