結果
| 問題 | No.349 干支の置き物 |
| コンテスト | |
| ユーザー |
toshiro_yanagi
|
| 提出日時 | 2018-06-11 15:38:28 |
| 言語 | Nim (2.2.6) |
| 結果 |
RE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 399 bytes |
| 記録 | |
| コンパイル時間 | 2,975 ms |
| コンパイル使用メモリ | 73,416 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-03-20 14:04:00 |
| 合計ジャッジ時間 | 3,902 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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, tables
proc readLine: auto = readLine stdin
var dic = initCountTable[string]()
let N = readLine().parseInt
for i in 0 ..< N:
dic.inc readLine()
while dic.largest.val != 1:
let dic_L = dic.largest
dic[dic_L.key] = 0
if $dic != "{}":
dic[dic.largest.key] = dic.largest.val - 1
else:
echo "NO"
quit()
dic[dic_L.key] = dic_L.val - 1
echo "YES"
toshiro_yanagi