Result

AC

Duration

4554ms

Code [DL]

Require Import Io.System.All List ListString.All Ascii.
Import ListNotations C.Notations.
Fixpoint q n:=match n with
0=>ret tt|S m=>let! l:=read_line in
do! match l with
Some s=>log match s with[_;x;y;_;z;_;_]=>if eqb x y then [x] else [z]|_=>[] end|_=>ret tt
end in
q m
end.
Definition main:=launch(fun _=>q 32).

stdin

843 238
445 336
512 226
822 266
584 498
712 124
188 562
266 686
678 872
955 225
618 881
818 775
381 885
655 558
423 572
758 542
466 663
495 163
699 692
814 426
252 722
633 775
677 576
725 921
874 742
747 745
173 976
174 376
944 957
472 756
963 665
694 779

stdout

2
3
2
2
4
1
8
6
8
5
8
7
8
5
5
5
6
1
9
4
7
3
7
9
7
7
9
3
4
7
6
7

stderr

ocamlfind ocamldep -package io-system -modules main.ml > main.ml.depends
ocamlfind ocamldep -package io-system -modules main.mli > main.mli.depends
ocamlfind ocamlc -c -package io-system -o main.cmi main.mli
+ ocamlfind ocamlc -c -package io-system -o main.cmi main.mli
ocamlfind: [WARNING] Package `threads': Linking problems may arise because of the missing -thread or -vmthread switch
ocamlfind ocamlopt -c -package io-system -o main.cmx main.ml
+ ocamlfind ocamlopt -c -package io-system -o main.cmx main.ml
ocamlfind: [WARNING] Package `threads': Linking problems may arise because of the missing -thread or -vmthread switch
ocamlfind ocamlopt -linkpkg -package io-system main.cmx -o main.native
+ ocamlfind ocamlopt -linkpkg -package io-system main.cmx -o main.native
ocamlfind: [WARNING] Package `threads': Linking problems may arise because of the missing -thread or -vmthread switch

strace

15    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffef7f04d20 /* 9 vars */) = 0
16    execve("/bin/cat", ["cat", "/volume/CODE", "/root/tail.v"], 0x562df89d9d60 /* 9 vars */) = 0
16    +++ exited with 0 +++
15    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=16, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
17    execve("/root/.opam/4.10.0/bin/coqc", ["coqc", "Main.v"], 0x562df89d9cb8 /* 10 vars */) = 0
17    +++ exited with 0 +++
15    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=17, si_uid=0, si_status=0, si_utime=37, si_stime=27} ---
18    execve("/root/.opam/4.10.0/bin/ocamlbuild", ["ocamlbuild", "main.native", "-use-ocamlfind", "-package", "io-system"], 0x562dfa707100 /* 10 vars */) = 0
19    execve("/bin/sh", ["/bin/sh", "-c", "mkdir /tmp/_build"], 0x7fb19dea5800 /* 10 vars */) = 0
19    execve("/bin/mkdir", ["mkdir", "/tmp/_build"], 0x55ab28a64cb0 /* 10 vars */) = 0
19    +++ exited with 0 +++
18    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=19, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
20    execve("/bin/sh", ["/bin/sh", "-c", "camlp4 -where 2>/dev/null"], 0x7fffa186aba8 /* 10 vars */) = 0
20    +++ exited with 127 +++
18    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=20, si_uid=0, si_status=127, si_utime=0, si_stime=0} ---
21    execve("/bin/sh", ["/bin/sh", "-c", "ocamlfind ocamldep -package io-s"...], 0x7fb19dea5860 /* 10 vars */) = 0
21    execve("/root/.opam/4.10.0/bin/ocamlfind", ["ocamlfind", "ocamldep", "-package", "io-system", "-modules", "main.ml"], 0x55f4ab1f0130 /* 10 vars */) = 0
22    execve("/root/.opam/4.10.0/bin/ocamldep.opt", ["ocamldep.opt", "-modules", "main.ml"], 0x7ffc4fb1cd20 /* 10 vars */) = 0
22    +++ exited with 0 +++
21    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=22, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
21    +++ exited with 0 +++
18    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=21, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
23    execve("/bin/sh", ["/bin/sh", "-c", "ocamlfind ocamldep -package io-s"...], 0x7fb19dea58a0 /* 10 vars */) = 0
23    execve("/root/.opam/4.10.0/bin/ocamlfind", ["ocamlfind", "ocamldep", "-package", "io-system", "-modules", "main.mli"], 0x55a7e460a150 /* 10 vars */) = 0
24    execve("/root/.opam/4.10.0/bin/ocamldep.opt", ["ocamldep.opt", "-modules", "main.mli"], 0x7fff8ae34400 /* 10 vars */) = 0
24    +++ exited with 0 +++
23    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=24, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
23    +++ exited with 0 +++
18    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=23, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
25    execve("/bin/sh", ["/bin/sh", "-c", "ocamlfind ocamlc -where > /tmp/_"...], 0x7fb19dea5940 /* 10 vars */) = 0
25    execve("/root/.opam/4.10.0/bin/ocamlfind", ["ocamlfind", "ocamlc", "-where"], 0x55884bc5b028 /* 10 vars */) = 0
26    execve("/root/.opam/4.10.0/bin/ocamlc.opt", ["ocamlc.opt", "-where"], 0x7fff68443608 /* 10 vars */) = 0
26    +++ exited with 0 +++
25    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=26, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
25    +++ exited with 0 +++
18    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=25, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
27    execve("/bin/sh", ["/bin/sh", "-c", "ocamlfind ocamlc -c -package io-"...], 0x7fb19dea58a0 /* 10 vars */) = 0
27    execve("/root/.opam/4.10.0/bin/ocamlfind", ["ocamlfind", "ocamlc", "-c", "-package", "io-system", "-o", "main.cmi", "main.mli"], 0x5617824f4138 /* 10 vars */) = 0
28    execve("/root/.opam/4.10.0/bin/ocamlc.opt", ["ocamlc.opt", "-c", "-o", "main.cmi", "-I", "/root/.opam/4.10.0/lib/bytes", "-I", "/root/.opam/4.10.0/lib/result", "-I", "/root/.opam/4.10.0/lib/seq", "-I", "/root/.opam/4.10.0/lib/lwt", "-I", "/root/.opam/4.10.0/lib/mmap", "-I", "/root/.opam/4.10.0/lib/ocplib-en"..., "-I", "/root/.opam/4.10.0/lib/ocplib-en"..., "-I", "/root/.opam/4.10.0/lib/lwt/unix", "-I", "/root/.opam/4.10.0/lib/num", "-I", "/root/.opam/4.10.0/lib/io-system", "main.mli"], 0x7ffd3e5a4ae0 /* 10 vars */) = 0
28    +++ exited with 0 +++
27    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=28, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
27    +++ exited with 0 +++
18    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=27, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
29    execve("/bin/sh", ["/bin/sh", "-c", "ocamlfind ocamlopt -c -package i"...], 0x7fb19dea58a0 /* 10 vars */) = 0
29    execve("/root/.opam/4.10.0/bin/ocamlfind", ["ocamlfind", "ocamlopt", "-c", "-package", "io-system", "-o", "main.cmx", "main.ml"], 0x55eda89d9130 /* 10 vars */) = 0
30    execve("/root/.opam/4.10.0/bin/ocamlopt.opt", ["ocamlopt.opt", "-c", "-o", "main.cmx", "-I", "/root/.opam/4.10.0/lib/bytes", "-I", "/root/.opam/4.10.0/lib/result", "-I", "/root/.opam/4.10.0/lib/seq", "-I", "/root/.opam/4.10.0/lib/lwt", "-I", "/root/.opam/4.10.0/lib/mmap", "-I", "/root/.opam/4.10.0/lib/ocplib-en"..., "-I", "/root/.opam/4.10.0/lib/ocplib-en"..., "-I", "/root/.opam/4.10.0/lib/lwt/unix", "-I", "/root/.opam/4.10.0/lib/num", "-I", "/root/.opam/4.10.0/lib/io-system", "main.ml"], 0x7fff293bca80 /* 10 vars */) = 0
31    execve("/bin/sh", ["sh", "-c", "as  -o 'main.o' '/tmp/camlasm39d"...], 0x7ffc9a28bf78 /* 10 vars */) = 0
31    execve("/usr/bin/as", ["as", "-o", "main.o", "/tmp/camlasm39d8c3.s"], 0x559b293db028 /* 10 vars */) = 0
31    +++ exited with 0 +++
30    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=31, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
30    +++ exited with 0 +++
29    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=30, si_uid=0, si_status=0, si_utime=2, si_stime=4} ---
29    +++ exited with 0 +++
18    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=29, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
32    execve("/bin/sh", ["/bin/sh", "-c", "ocamlfind ocamlopt -linkpkg -pac"...], 0x7fb19dea5940 /* 10 vars */) = 0
32    execve("/root/.opam/4.10.0/bin/ocamlfind", ["ocamlfind", "ocamlopt", "-linkpkg", "-package", "io-system", "main.cmx", "-o", "main.native"], 0x5620e7688160 /* 10 vars */) = 0
33    execve("/root/.opam/4.10.0/bin/ocamlopt.opt", ["ocamlopt.opt", "-o", "main.native", "-I", "/root/.opam/4.10.0/lib/bytes", "-I", "/root/.opam/4.10.0/lib/result", "-I", "/root/.opam/4.10.0/lib/seq", "-I", "/root/.opam/4.10.0/lib/lwt", "-I", "/root/.opam/4.10.0/lib/mmap", "-I", "/root/.opam/4.10.0/lib/ocplib-en"..., "-I", "/root/.opam/4.10.0/lib/ocplib-en"..., "-I", "/root/.opam/4.10.0/lib/lwt/unix", "-I", "/root/.opam/4.10.0/lib/num", "-I", "/root/.opam/4.10.0/lib/io-system", "/root/.opam/4.10.0/lib/result/re"..., "/root/.opam/4.10.0/lib/lwt/lwt.c"..., "/root/.opam/4.10.0/lib/ocaml/uni"..., "/root/.opam/4.10.0/lib/ocaml/big"..., "/root/.opam/4.10.0/lib/mmap/mmap"..., "/root/.opam/4.10.0/lib/ocplib-en"..., "/root/.opam/4.10.0/lib/ocplib-en"..., "/root/.opam/4.10.0/lib/lwt/unix/"..., "/root/.opam/4.10.0/lib/ocaml/num"..., ...], 0x7fff438d2870 /* 10 vars */) = 0
34    execve("/bin/sh", ["sh", "-c", "as  -o '/tmp/camlstartup9dcb2b.o"...], 0x7ffcc0d650f0 /* 10 vars */) = 0
34    execve("/usr/bin/as", ["as", "-o", "/tmp/camlstartup9dcb2b.o", "/tmp/camlstartup86272b.s"], 0x55ba3a9f2028 /* 10 vars */) = 0
34    +++ exited with 0 +++
33    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=34, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
35    execve("/bin/sh", ["sh", "-c", "gcc -O2 -fno-strict-aliasing -fw"...], 0x7ffcc0d650f0 /* 10 vars */) = 0
35    execve("/usr/bin/gcc", ["gcc", "-O2", "-fno-strict-aliasing", "-fwrapv", "-Wall", "-fno-common", "-fno-tree-vrp", "-ffunction-sections", "-D_FILE_OFFSET_BITS=64", "-D_REENTRANT", "-DCAML_NAME_SPACE", "-Wl,-E", "-o", "main.native", "-L/root/.opam/4.10.0/lib/bytes", "-L/root/.opam/4.10.0/lib/result", "-L/root/.opam/4.10.0/lib/seq", "-L/root/.opam/4.10.0/lib/lwt", "-L/root/.opam/4.10.0/lib/mmap", "-L/root/.opam/4.10.0/lib/ocplib-"..., "-L/root/.opam/4.10.0/lib/ocplib-"..., "-L/root/.opam/4.10.0/lib/lwt/uni"..., "-L/root/.opam/4.10.0/lib/num", "-L/root/.opam/4.10.0/lib/io-syst"..., "-L/root/.opam/4.10.0/lib/ocaml", "/tmp/camlstartup9dcb2b.o", "/root/.opam/4.10.0/lib/ocaml/std"..., "main.o", "/root/.opam/4.10.0/lib/io-system"..., "/root/.opam/4.10.0/lib/ocaml/num"..., "/root/.opam/4.10.0/lib/lwt/unix/"..., "/root/.opam/4.10.0/lib/ocplib-en"..., ...], 0x55c490ccebb8 /* 10 vars */) = 0
36    execve("/usr/libexec/gcc/x86_64-alpine-linux-musl/9.3.0/collect2", ["/usr/libexec/gcc/x86_64-alpine-l"..., "-plugin", "/usr/libexec/gcc/x86_64-alpine-l"..., "-plugin-opt=/usr/libexec/gcc/x86"..., "-plugin-opt=-fresolution=/tmp/cc"..., "-plugin-opt=-pass-through=-lgcc", "-plugin-opt=-pass-through=-lgcc_"..., "-plugin-opt=-pass-through=-lc", "-plugin-opt=-pass-through=-lgcc", "-plugin-opt=-pass-through=-lgcc_"..., "--eh-frame-hdr", "--hash-style=gnu", "-m", "elf_x86_64", "--as-needed", "-dynamic-linker", "/lib/ld-musl-x86_64.so.1", "-pie", "-z", "relro", "-z", "now", "-o", "main.native", "/usr/lib/gcc/x86_64-alpine-linux"..., "/usr/lib/gcc/x86_64-alpine-linux"..., "/usr/lib/gcc/x86_64-alpine-linux"..., "-L/root/.opam/4.10.0/lib/bytes", "-L/root/.opam/4.10.0/lib/result", "-L/root/.opam/4.10.0/lib/seq", "-L/root/.opam/4.10.0/lib/lwt", "-L/root/.opam/4.10.0/lib/mmap", ...], 0xaaf060 /* 15 vars */) = 0
37    execve("/usr/lib/gcc/x86_64-alpine-linux-musl/9.3.0/../../../../x86_64-alpine-linux-musl/bin/ld", ["/usr/lib/gcc/x86_64-alpine-linux"..., "-plugin", "/usr/libexec/gcc/x86_64-alpine-l"..., "-plugin-opt=/usr/libexec/gcc/x86"..., "-plugin-opt=-fresolution=/tmp/cc"..., "-plugin-opt=-pass-through=-lgcc", "-plugin-opt=-pass-through=-lgcc_"..., "-plugin-opt=-pass-through=-lc", "-plugin-opt=-pass-through=-lgcc", "-plugin-opt=-pass-through=-lgcc_"..., "--eh-frame-hdr", "--hash-style=gnu", "-m", "elf_x86_64", "--as-needed", "-dynamic-linker", "/lib/ld-musl-x86_64.so.1", "-pie", "-z", "relro", "-z", "now", "-o", "main.native", "/usr/lib/gcc/x86_64-alpine-linux"..., "/usr/lib/gcc/x86_64-alpine-linux"..., "/usr/lib/gcc/x86_64-alpine-linux"..., "-L/root/.opam/4.10.0/lib/bytes", "-L/root/.opam/4.10.0/lib/result", "-L/root/.opam/4.10.0/lib/seq", "-L/root/.opam/4.10.0/lib/lwt", "-L/root/.opam/4.10.0/lib/mmap", ...], 0x7fff5543faf8 /* 15 vars */) = 0
37    +++ exited with 0 +++
36    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=37, si_uid=0, si_status=0, si_utime=16, si_stime=51} ---
36    +++ exited with 0 +++
35    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=36, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
35    +++ exited with 0 +++
33    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=35, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
33    +++ exited with 0 +++
32    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=33, si_uid=0, si_status=0, si_utime=4, si_stime=10} ---
32    +++ exited with 0 +++
18    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=32, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
38    execve("/bin/sh", ["sh", "-c", "ln -sf /tmp/_build/main.native /"...], 0x7fffa186aba8 /* 10 vars */) = 0
38    execve("/bin/ln", ["ln", "-sf", "/tmp/_build/main.native", "/tmp"], 0x55fe2f044d60 /* 10 vars */) = 0
38    +++ exited with 0 +++
18    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=38, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
18    +++ exited with 0 +++
15    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=18, si_uid=0, si_status=0, si_utime=2, si_stime=0} ---
39    execve("/bin/cat", ["cat", "-"], 0x562df89d9d08 /* 10 vars */ <unfinished ...>
40    execve("./main.native", ["./main.native"], 0x562df89d9cf0 /* 10 vars */ <unfinished ...>
39    <... execve resumed>)             = 0
40    <... execve resumed>)             = 0
39    +++ exited with 0 +++
15    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=39, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
41    +++ exited with 0 +++
40    +++ exited with 0 +++
15    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=40, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
42    execve("/bin/rm", ["rm", "-rf", "/tmp/Main.glob", "/tmp/Main.v", "/tmp/Main.vo", "/tmp/Main.vok", "/tmp/Main.vos", "/tmp/_build", "/tmp/main.ml", "/tmp/main.mli", "/tmp/main.native"], 0x562dfa707148 /* 10 vars */) = 0
42    +++ exited with 0 +++
15    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=42, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
15    +++ exited with 0 +++