結果
問題 | No.349 干支の置き物 |
ユーザー |
![]() |
提出日時 | 2018-06-11 15:38:28 |
言語 | Nim (2.2.0) |
結果 |
RE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 399 bytes |
コンパイル時間 | 3,942 ms |
コンパイル使用メモリ | 71,592 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 13:33:02 |
合計ジャッジ時間 | 4,979 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 RE * 1 |
other | AC * 24 RE * 5 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 18) Warning: imported and not used: 'sequtils' [UnusedImport]
ソースコード
import strutils, sequtils, tablesproc readLine: auto = readLine stdinvar dic = initCountTable[string]()let N = readLine().parseIntfor i in 0 ..< N:dic.inc readLine()while dic.largest.val != 1:let dic_L = dic.largestdic[dic_L.key] = 0if $dic != "{}":dic[dic.largest.key] = dic.largest.val - 1else:echo "NO"quit()dic[dic_L.key] = dic_L.val - 1echo "YES"