結果

問題 No.239 にゃんぱすー
ユーザー はむ吉🐹はむ吉🐹
提出日時 2015-10-24 11:05:49
言語 Haskell
(9.8.2)
結果
AC  
実行時間 53 ms / 2,000 ms
コード長 383 bytes
コンパイル時間 711 ms
コンパイル使用メモリ 163,160 KB
実行使用メモリ 17,388 KB
最終ジャッジ日時 2023-10-11 05:35:53
合計ジャッジ時間 3,325 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
6,904 KB
testcase_01 AC 2 ms
6,852 KB
testcase_02 AC 2 ms
6,860 KB
testcase_03 AC 3 ms
6,884 KB
testcase_04 AC 3 ms
6,828 KB
testcase_05 AC 2 ms
6,844 KB
testcase_06 AC 3 ms
6,808 KB
testcase_07 AC 3 ms
6,956 KB
testcase_08 AC 3 ms
7,264 KB
testcase_09 AC 4 ms
7,864 KB
testcase_10 AC 4 ms
8,504 KB
testcase_11 AC 6 ms
9,736 KB
testcase_12 AC 12 ms
11,300 KB
testcase_13 AC 13 ms
11,324 KB
testcase_14 AC 12 ms
11,280 KB
testcase_15 AC 22 ms
11,976 KB
testcase_16 AC 22 ms
11,984 KB
testcase_17 AC 22 ms
12,576 KB
testcase_18 AC 23 ms
12,908 KB
testcase_19 AC 23 ms
12,988 KB
testcase_20 AC 33 ms
14,044 KB
testcase_21 AC 32 ms
15,268 KB
testcase_22 AC 42 ms
15,372 KB
testcase_23 AC 43 ms
15,240 KB
testcase_24 AC 43 ms
17,020 KB
testcase_25 AC 53 ms
17,140 KB
testcase_26 AC 53 ms
17,160 KB
testcase_27 AC 3 ms
7,256 KB
testcase_28 AC 5 ms
8,772 KB
testcase_29 AC 12 ms
11,232 KB
testcase_30 AC 12 ms
11,264 KB
testcase_31 AC 22 ms
11,948 KB
testcase_32 AC 22 ms
13,040 KB
testcase_33 AC 33 ms
13,296 KB
testcase_34 AC 42 ms
15,300 KB
testcase_35 AC 42 ms
17,360 KB
testcase_36 AC 53 ms
17,388 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.1/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

import Data.List (transpose, elemIndices)

findRenchon :: [[String]] -> Int
findRenchon xs
    | length cands == 1 = head cands
    | otherwise         = -1
    where
        cands = map (+ 1) $ elemIndices (length xs - 1) $
            map (length . elemIndices "nyanpass") xs

main :: IO ()
main = getLine >> getContents >>= print . findRenchon . transpose .
    map words . lines
0