#12590: 4 AC 1 TLE


r2005.wang@gmail.com (王藝誠)


為甚麼會這樣?

k=True
while k:
    a=input()
    if a=="STOP!!":
        k=False
    else:
        a=list(a)
        b=list(input())
        a.sort()
        b.sort()
        if a==b:
            print("yes")
        else:
            print("no")

#12591: Re:4 AC 1 TLE


r2005.wang@gmail.com (王藝誠)


為甚麼會這樣?

k=True
while k:
    a=input()
    if a=="STOP!!":
        k=False
    else:
        a=list(a)
        b=list(input())
        a.sort()
        b.sort()
        if a==b:
            print("yes")
        else:
            print("no")

Python


#12592: Re:4 AC 1 TLE


anandrewboy70900 (ShowTsai)


排序太慢了





#12742: Re:4 AC 1 TLE


asnewchien@gmail.com (david)


排序太慢了







sort 真的很慢