結果

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

ソースコード

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