結果

問題 No.504 ゲーム大会(ランキング)
ユーザー taktak
提出日時 2018-04-12 09:24:59
言語 F#
(F# 4.0)
結果
AC  
実行時間 550 ms / 2,000 ms
コード長 218 bytes
コンパイル時間 4,460 ms
コンパイル使用メモリ 155,152 KB
実行使用メモリ 32,236 KB
最終ジャッジ日時 2023-09-09 04:13:57
合計ジャッジ時間 9,991 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
24,912 KB
testcase_01 AC 82 ms
24,864 KB
testcase_02 AC 82 ms
24,952 KB
testcase_03 AC 82 ms
22,888 KB
testcase_04 AC 82 ms
24,996 KB
testcase_05 AC 82 ms
24,964 KB
testcase_06 AC 82 ms
24,964 KB
testcase_07 AC 533 ms
30,232 KB
testcase_08 AC 550 ms
32,236 KB
testcase_09 AC 537 ms
28,116 KB
testcase_10 AC 531 ms
30,324 KB
testcase_11 AC 532 ms
30,172 KB
testcase_12 AC 524 ms
32,220 KB
testcase_13 AC 522 ms
28,328 KB
testcase_14 AC 531 ms
28,204 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)

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