結果

問題 No.349 干支の置き物
コンテスト
ユーザー n_knuu
提出日時 2016-03-19 02:16:35
言語 Nim
(2.2.8)
コンパイル:
nim --nimcache=~ --hints:off -o:a.out -d:release cpp _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 361 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,712 ms
コンパイル使用メモリ 70,404 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2026-03-19 01:03:00
合計ジャッジ時間 3,507 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import strutils, tables

var
  N = stdin.readline.parseInt
  counter = toCountTable(@["ne", "ushi", "tora", "u", "tatsu", "mi", "uma", "hitsuji", "saru", "tori", "inu", "i"])
for _ in 1..<N:
  counter.inc(stdin.readline)
if (N mod 2 == 0 and counter.largest.val * 2 <= N) or (N mod 2 == 1 and counter.largest.val * 2 - 1 <= N):
  echo("YES")
else:
  echo("NO")
0