結果

問題 No.239 にゃんぱすー
ユーザー toshiro_yanagi
提出日時 2018-06-04 01:24:16
言語 Nim
(2.2.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 370 bytes
コンパイル時間 3,365 ms
コンパイル使用メモリ 65,280 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-30 09:30:22
合計ジャッジ時間 4,450 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

import strutils, sequtils, algorithm
proc input: auto = stdin.readLine

let N = input().parseInt
var dic = newSeq[string](N)
dic.fill("")

for i in 0 ..< N:
  let A = input().split

  for j, a in A:
    dic[j] &= a
    if i != A.high: dic[j] &= ", "

for i, v in dic:
  dic[i] = $(v.count("nyanpass") + 1)

if dic.count($N) == 1:
  echo dic.find($N) + 1
else:
  echo -1
0