結果
| 問題 | No.647 明太子 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-09-20 00:26:59 |
| 言語 | F# (F# 10.0) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 1,597 bytes |
| 記録 | |
| コンパイル時間 | 5,284 ms |
| コンパイル使用メモリ | 208,744 KB |
| 実行使用メモリ | 473,864 KB |
| 最終ジャッジ日時 | 2026-04-02 00:16:42 |
| 合計ジャッジ時間 | 21,443 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 MLE * 1 |
| other | AC * 9 MLE * 2 -- * 9 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (181 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.0/publish/
ソースコード
let solve abLst xyLst =
let m = List.length xyLst
let chooseLst =
seq abLst
|> Seq.map (fun (a, b) -> Seq.init m (fun i -> (a, b, xyLst.[i])))
|> Seq.concat
|> Seq.map
(fun (a, b, (i, x, y)) ->
async {
return
if (x <= a) && (y >= b) then
Some(i)
else
None
})
|> Async.Parallel
|> Async.RunSynchronously
|> Array.toSeq
|> Seq.choose id
|> Seq.countBy id
|> Seq.sortBy (fun (i, iCnt) -> (-iCnt, i))
|> Seq.toList
if List.isEmpty chooseLst then
stdout.WriteLine(0)
else
let maxCnt = List.map (fun (i, iCnt) -> iCnt) chooseLst |> List.max
List.filter (fun (i, iCnt) -> iCnt = maxCnt) chooseLst
|> List.iter (fun (i, iCnt) -> printfn "%A" i)
let () =
let n = stdin.ReadLine() |> int
let abLst =
seq {
for i in 1..n do
let ab =
stdin.ReadLine()
|> fun s -> s.Split()
|> fun arr -> (int arr.[0], int arr.[1])
yield ab }
|> Seq.toList
let m = stdin.ReadLine() |> int
let xyLst =
seq {
for i in 1..m do
let xy =
stdin.ReadLine()
|> fun s -> s.Split()
|> fun arr -> (i, int arr.[0], int arr.[1])
yield xy }
|> Seq.toList
solve abLst xyLst