結果
問題 | No.69 文字を自由に並び替え |
ユーザー |
|
提出日時 | 2016-10-28 13:47:50 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 12 ms / 5,000 ms |
コード長 | 327 bytes |
コンパイル時間 | 53 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-14 06:24:56 |
合計ジャッジ時間 | 862 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 |
ソースコード
def check(A,B):l={}for i in xrange(len(A)):if A[i] not in l:l[A[i]] = 0l[A[i]] += 1for i in xrange(len(B)):if B[i] not in l:print "NO"returnl[B[i]] -= 1if l[B[i]] == 0: del l[B[i]]if len(l)==0: print "YES"else: print "NO"A=raw_input()B=raw_input()l={}check(A,B)