結果

問題 No.231 めぐるはめぐる (1)
ユーザー kuuso1kuuso1
提出日時 2016-08-18 06:58:52
言語 F#
(F# 4.0)
結果
WA  
実行時間 -
コード長 643 bytes
コンパイル時間 6,231 ms
コンパイル使用メモリ 208,192 KB
実行使用メモリ 35,708 KB
最終ジャッジ日時 2024-04-25 08:43:09
合計ジャッジ時間 10,009 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 314 ms
35,700 KB
testcase_01 AC 68 ms
31,232 KB
testcase_02 AC 66 ms
31,104 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 69 ms
31,104 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 308 ms
34,592 KB
testcase_10 AC 314 ms
35,664 KB
testcase_11 AC 71 ms
31,104 KB
testcase_12 AC 317 ms
35,708 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (207 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
/home/judge/data/code/Main.fs(9,9): warning FS0020: この式の結果の型は '(int * int) list' で、暗黙的に無視されます。'ignore' を使用してこの値を明示的に破棄してください (例: 'expr |> ignore')。または 'let' を使用して結果を名前にバインドします (例: 'let result = expr')。 [/home/judge/data/code/main.fsproj]
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

open System
type Sol() =
    member this.Solve() = 
        let N = stdin.ReadLine() |> int
        let mutable gain : (int*int) list = []
        for i = 0 to (N-1) do
            gain <- ( (( stdin.ReadLine().Split() |> fun ss -> (int ss.[0]) - 30000*(int ss.[1]) ),(i+1)) :: gain )
        
        gain |> List.sortWith (fun (p:(int*int)) (q:(int*int)) -> (fst p).CompareTo(fst q)) |> List.rev
        let ans = if ((fst gain.[0]) * 6) >= 3000000 then "YES" else "NO"
        printfn "%s" ans
        if ans = "YES" then
            for i=0 to 5 do
                printfn "%d" (snd gain.[0])
        

let mySol = new Sol()
mySol.Solve()
0