Submission #2714087
Source Code Expand
open System open System.Collections.Generic open System.Linq open System let Puts = Console.WriteLine : 'a -> unit let Reads () = Console.ReadLine().Split() let ReadDouble () = Reads() |> (fun x -> x.[0], x.[1]) let ReadTriple () = Reads() |> (fun x -> x.[0], x.[1], x.[2]) let ReadQuadruple () = Reads() |> (fun x -> x.[0], x.[1], x.[2], x.[3]) let FuncDouble f1 f2 (t1, t2) = (f1 t1, f2 t2) let FuncTriple f1 f2 f3 (t1, t2, t3) = (f1 t1, f2 t2, f3 t3) let FuncQuadruple f1 f2 f3 f4 (t1, t2, t3, t4) = (f1 t1, f2 t2, f3 t3, f4 t4) let ReadIntDouble () = ReadDouble () |> FuncDouble int int let ensmallen l = l % 1000000007L let manhattan x y = abs (fst x - fst y) + abs (snd x - snd y) let (n, m) = ReadIntDouble () // main code let students = seq { for _ in 1..n -> ReadIntDouble () } |> List.ofSeq let checkPoint = seq { for _ in 1..m -> ReadIntDouble () } |> List.ofSeq for student in students do checkPoint |> Seq.mapi (fun i v -> i + 1, manhattan v student) |> Seq.minBy snd |> fst |> Console.WriteLine
Submission Info
Submission Time | |
---|---|
Task | B - Checkpoints |
User | yuchiki |
Language | F# (Mono 4.0) |
Score | 200 |
Code Size | 1090 Byte |
Status | AC |
Exec Time | 33 ms |
Memory | 13524 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | sample_01.txt, sample_02.txt, sample_03.txt, subtask_1_1.txt, subtask_1_2.txt, subtask_1_3.txt, subtask_1_4.txt, subtask_1_5.txt, subtask_1_6.txt, subtask_1_7.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | AC | 32 ms | 9556 KB |
sample_02.txt | AC | 32 ms | 9556 KB |
sample_03.txt | AC | 32 ms | 9556 KB |
subtask_1_1.txt | AC | 32 ms | 9556 KB |
subtask_1_2.txt | AC | 33 ms | 11604 KB |
subtask_1_3.txt | AC | 33 ms | 11476 KB |
subtask_1_4.txt | AC | 32 ms | 9556 KB |
subtask_1_5.txt | AC | 33 ms | 11476 KB |
subtask_1_6.txt | AC | 33 ms | 13524 KB |
subtask_1_7.txt | AC | 32 ms | 9556 KB |