結果
| 問題 |
No.706 多眼生物の調査
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-09-20 14:58:36 |
| 言語 | Nim (2.2.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 496 bytes |
| コンパイル時間 | 3,593 ms |
| コンパイル使用メモリ | 65,676 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-01 04:40:55 |
| 合計ジャッジ時間 | 4,201 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 1 WA * 4 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 39) Warning: imported and not used: 'math' [UnusedImport]
ソースコード
import sequtils, strutils, algorithm, math
var
n = readLine(stdin).parseInt
s:seq[string] = mapIt(0..<n, readLine(stdin))
maxEyes = 0
cntEyes = 0
numOfEyes:seq[int] = mapIt(0..<1000, 0)
for i in s:
cntEyes = i.count('^')
numOfEyes[cntEyes] += 1
if cntEyes > maxEyes:
maxEyes = cntEyes
numOfEyes = numOfEyes[1..(maxEyes)]
if count(numOfEyes, max(numOfEyes)) > 1:
numOfEyes.reverse
echo find(numOfEyes, max(numOfEyes)) + 1
else:
echo find(numOfEyes, max(numOfEyes)) + 1