n=int(input())
string=input().split()
count={}
ss=[]
for i in string:
if i in count:
count[i] +=1
else:
count[i] = 1
for i in string:
if i not in ss:
ss.append(i)
dem= len(ss)
print(dem)
a=sorted(ss)
for i in sorted(count, key=count.get, reverse=False):
print(i, count[i])
12345678910111213141516171819202122232425262728293031323334353637
Để sử dụng tính năng này, Bạn cần đăng nhập bằng tài khoản Howkteam.
Đăng nhập
Để xem được nội dung và giúp Kteam duy trì hoạt động.
Bạn vui lòng tắt Adblock trên website howkteam.vn nhé!
debug thử chưa?