結果

問題 No.231 めぐるはめぐる (1)
ユーザー kuuso1kuuso1
提出日時 2016-08-18 15:49:05
言語 F#
(F# 4.0)
結果
AC  
実行時間 350 ms / 1,000 ms
コード長 670 bytes
コンパイル時間 9,072 ms
コンパイル使用メモリ 189,592 KB
実行使用メモリ 35,772 KB
最終ジャッジ日時 2024-04-25 13:36:10
合計ジャッジ時間 13,671 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 350 ms
35,704 KB
testcase_01 AC 75 ms
30,976 KB
testcase_02 AC 75 ms
30,848 KB
testcase_03 AC 347 ms
35,464 KB
testcase_04 AC 347 ms
35,080 KB
testcase_05 AC 76 ms
31,352 KB
testcase_06 AC 344 ms
34,920 KB
testcase_07 AC 340 ms
34,940 KB
testcase_08 AC 343 ms
35,772 KB
testcase_09 AC 341 ms
34,744 KB
testcase_10 AC 344 ms
34,864 KB
testcase_11 AC 76 ms
30,976 KB
testcase_12 AC 346 ms
34,804 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (241 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  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 ul = 3000000
        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 <- gain |> List.sortWith (fun (p:(int*int)) (q:(int*int)) -> (fst p).CompareTo(fst q)) |> List.rev

        let ans = if ((fst gain.[0]) * 6) >= ul 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