結果

問題 No.504 ゲーム大会(ランキング)
ユーザー taktak
提出日時 2018-04-12 09:26:46
言語 F#
(F# 4.0)
結果
AC  
実行時間 573 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 3,011 ms
コンパイル使用メモリ 159,548 KB
実行使用メモリ 32,260 KB
最終ジャッジ日時 2023-09-09 04:14:21
合計ジャッジ時間 9,214 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
20,760 KB
testcase_01 AC 79 ms
22,824 KB
testcase_02 AC 80 ms
24,908 KB
testcase_03 AC 80 ms
22,864 KB
testcase_04 AC 79 ms
22,876 KB
testcase_05 AC 80 ms
24,760 KB
testcase_06 AC 81 ms
22,916 KB
testcase_07 AC 563 ms
28,292 KB
testcase_08 AC 562 ms
28,168 KB
testcase_09 AC 559 ms
28,172 KB
testcase_10 AC 563 ms
28,120 KB
testcase_11 AC 573 ms
30,068 KB
testcase_12 AC 557 ms
28,144 KB
testcase_13 AC 536 ms
32,260 KB
testcase_14 AC 572 ms
30,100 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 aHead = a |> Array.head

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