結果

問題 No.504 ゲーム大会(ランキング)
ユーザー taktak
提出日時 2018-04-12 09:30:28
言語 F#
(F# 4.0)
結果
AC  
実行時間 541 ms / 2,000 ms
コード長 233 bytes
コンパイル時間 3,067 ms
コンパイル使用メモリ 153,096 KB
実行使用メモリ 31,780 KB
最終ジャッジ日時 2023-09-09 04:14:50
合計ジャッジ時間 9,061 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
22,884 KB
testcase_01 AC 82 ms
22,972 KB
testcase_02 AC 82 ms
24,908 KB
testcase_03 AC 80 ms
22,868 KB
testcase_04 AC 81 ms
20,864 KB
testcase_05 AC 81 ms
20,888 KB
testcase_06 AC 81 ms
22,908 KB
testcase_07 AC 538 ms
29,760 KB
testcase_08 AC 537 ms
27,756 KB
testcase_09 AC 541 ms
29,868 KB
testcase_10 AC 538 ms
27,740 KB
testcase_11 AC 537 ms
25,728 KB
testcase_12 AC 527 ms
31,780 KB
testcase_13 AC 518 ms
27,732 KB
testcase_14 AC 531 ms
29,952 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

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

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

f a
0