結果
問題 | No.69 文字を自由に並び替え |
ユーザー |
![]() |
提出日時 | 2017-08-04 07:57:39 |
言語 | Nim (2.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 296 bytes |
コンパイル時間 | 2,770 ms |
コンパイル使用メモリ | 66,760 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 01:58:51 |
合計ジャッジ時間 | 3,405 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport] /home/judge/data/code/Main.nim(1, 17) Warning: imported and not used: 'strutils' [UnusedImport]
ソースコード
import sequtils,strutilsvarA = stdin.readlineB = stdin.readlinecnt : array[ord('a')..ord('z'),int]for i,a in A:cnt[ord(a)] += 1cnt[ord(B[i])] -= 1var flag : boolfor i in cnt:if i != 0:flag = truebreakif flag:echo "NO"else:echo "YES"