結果

問題 No.504 ゲーム大会(ランキング)
ユーザー taktak
提出日時 2018-04-12 09:33:38
言語 F#
(F# 4.0)
結果
AC  
実行時間 596 ms / 2,000 ms
コード長 213 bytes
コンパイル時間 3,145 ms
コンパイル使用メモリ 155,176 KB
実行使用メモリ 35,136 KB
最終ジャッジ日時 2023-09-09 04:15:00
合計ジャッジ時間 9,565 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
23,068 KB
testcase_01 AC 85 ms
22,956 KB
testcase_02 AC 85 ms
25,004 KB
testcase_03 AC 84 ms
25,004 KB
testcase_04 AC 84 ms
23,076 KB
testcase_05 AC 85 ms
23,052 KB
testcase_06 AC 80 ms
23,084 KB
testcase_07 AC 595 ms
33,040 KB
testcase_08 AC 584 ms
35,116 KB
testcase_09 AC 595 ms
33,012 KB
testcase_10 AC 591 ms
32,948 KB
testcase_11 AC 583 ms
35,136 KB
testcase_12 AC 587 ms
35,092 KB
testcase_13 AC 576 ms
31,156 KB
testcase_14 AC 596 ms
30,980 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

/home/judge/data/code/Main.fs(4,8): warning FS0025: Incomplete pattern matches on this expression. For example, the value '[]' may indicate a case not covered by the pattern(s).

ソースコード

diff #

let N = stdin.ReadLine() |> int
let a = List.init N (fun _ -> stdin.ReadLine() |> int)

let f (a::b) = 
    b 
    |> List.scan (fun acc x -> if x > a then acc + 1  else acc) 1
    |> List.iter (printfn "%i")

f a
0