Language Test

Submission #1275356

Source codeソースコード

let rec seq s t = if s > t then []
                  else s :: seq (s + 1) t

let () = 
  let n = read_int () in
  let nodes = seq 1 n in
  let (n1,_) = List.fold_left (fun (ix, mx) x ->
                               print_endline @@ "? 1 " ^ (string_of_int x);
                               let y = read_int () in
                               if mx < y then (x, y) else (ix,mx)) (0,0) nodes in
  let (_,d) = List.fold_left (fun (ix, mx) x ->
                              print_endline @@ "? " ^ (string_of_int n1) ^ " " ^ (string_of_int x);
                              let y = read_int () in
                              if mx < y then (x, y) else (ix,mx)) (0,0) nodes in
  print_endline @@ "! " ^ (string_of_int d)

Submission

Task問題 C - 高橋くんと木の直径
User nameユーザ名 ducktail
Created time投稿日時
Language言語 OCaml (4.02.3)
Status状態 AC
Score得点 100
Source lengthソースコード長 740 Byte
File nameファイル名
Exec time実行時間 7 ms
Memory usageメモリ使用量 2892 KB

Test case

Set

Set name Score得点 / Max score Cases
Sample - subtask0_0.txt
Subtask1 20 / 20 subtask1_0.txt,subtask1_1.txt,subtask1_10.txt,subtask1_11.txt,subtask1_12.txt,subtask1_13.txt,subtask1_14.txt,subtask1_15.txt,subtask1_16.txt,subtask1_17.txt,subtask1_18.txt,subtask1_19.txt,subtask1_2.txt,subtask1_20.txt,subtask1_3.txt,subtask1_4.txt,subtask1_5.txt,subtask1_6.txt,subtask1_7.txt,subtask1_8.txt,subtask1_9.txt,subtask0_0.txt
All 80 / 80 subtask0_0.txt,subtask1_0.txt,subtask1_1.txt,subtask1_10.txt,subtask1_11.txt,subtask1_12.txt,subtask1_13.txt,subtask1_14.txt,subtask1_15.txt,subtask1_16.txt,subtask1_17.txt,subtask1_18.txt,subtask1_19.txt,subtask1_2.txt,subtask1_20.txt,subtask1_3.txt,subtask1_4.txt,subtask1_5.txt,subtask1_6.txt,subtask1_7.txt,subtask1_8.txt,subtask1_9.txt,subtask2_0.txt,subtask2_1.txt,subtask2_10.txt,subtask2_11.txt,subtask2_12.txt,subtask2_13.txt,subtask2_14.txt,subtask2_15.txt,subtask2_16.txt,subtask2_17.txt,subtask2_18.txt,subtask2_19.txt,subtask2_2.txt,subtask2_3.txt,subtask2_4.txt,subtask2_5.txt,subtask2_6.txt,subtask2_7.txt,subtask2_8.txt,subtask2_9.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
subtask0_0.txt AC 3 ms 848 KB
subtask1_0.txt AC 6 ms 848 KB
subtask1_1.txt AC 6 ms 848 KB
subtask1_10.txt AC 6 ms 848 KB
subtask1_11.txt AC 7 ms 844 KB
subtask1_12.txt AC 6 ms 852 KB
subtask1_13.txt AC 6 ms 848 KB
subtask1_14.txt AC 7 ms 848 KB
subtask1_15.txt AC 6 ms 848 KB
subtask1_16.txt AC 6 ms 848 KB
subtask1_17.txt AC 6 ms 848 KB
subtask1_18.txt AC 6 ms 844 KB
subtask1_19.txt AC 6 ms 848 KB
subtask1_2.txt AC 6 ms 848 KB
subtask1_20.txt AC 3 ms 720 KB
subtask1_3.txt AC 6 ms 848 KB
subtask1_4.txt AC 6 ms 848 KB
subtask1_5.txt AC 6 ms 720 KB
subtask1_6.txt AC 7 ms 848 KB
subtask1_7.txt AC 6 ms 852 KB
subtask1_8.txt AC 7 ms 848 KB
subtask1_9.txt AC 6 ms 844 KB
subtask2_0.txt AC 6 ms 848 KB
subtask2_1.txt AC 6 ms 848 KB
subtask2_10.txt AC 6 ms 848 KB
subtask2_11.txt AC 6 ms 844 KB
subtask2_12.txt AC 6 ms 720 KB
subtask2_13.txt AC 6 ms 848 KB
subtask2_14.txt AC 6 ms 848 KB
subtask2_15.txt AC 7 ms 2892 KB
subtask2_16.txt AC 6 ms 848 KB
subtask2_17.txt AC 6 ms 716 KB
subtask2_18.txt AC 6 ms 844 KB
subtask2_19.txt AC 6 ms 848 KB
subtask2_2.txt AC 6 ms 848 KB
subtask2_3.txt AC 6 ms 852 KB
subtask2_4.txt AC 6 ms 720 KB
subtask2_5.txt AC 6 ms 848 KB
subtask2_6.txt AC 6 ms 848 KB
subtask2_7.txt AC 6 ms 848 KB
subtask2_8.txt AC 6 ms 844 KB
subtask2_9.txt AC 6 ms 848 KB