Language: C

let () = Scanf.scanf "%d %d %d %d\n" @@ fun x y z k ->
  let as_ = Array.init x @@ fun _ -> Scanf.scanf "%d " @@ fun a -> a in
  let bs = Array.init y @@ fun _ -> Scanf.scanf "%d " @@ fun b -> b in
  let cs = Array.init z @@ fun _ -> Scanf.scanf "%d " @@ fun c -> c in
  Array.sort (fun a a' -> compare a' a) as_;
  Array.sort (fun b b' -> compare b' b) bs;
  Array.sort (fun c c' -> compare c' c) cs;
  let abcs =
    Array.of_list @@
    List.concat @@ Array.to_list @@ Array.init (min x k) @@ fun i ->
      List.concat @@ Array.to_list @@ Array.init (min y (k / (i + 1))) @@ fun j ->
        Array.to_list @@ Array.init (min z (k / (i + 1) / (j + 1))) @@ fun k ->
          as_.(i) + bs.(j) + cs.(k) in
  Array.sort (fun abc abc' -> compare abc' abc) abcs;
  for i = 0 to k - 1 do
    Printf.printf "%d\n" abcs.(i)
  done


Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | let () = Scanf.scanf "%d %d %d %d\n" @@ fun x y z k ->
      | ^~~
main.c:1:1: error: type defaults to 'int' in declaration of 'let' [-Wimplicit-int]
main.c:1:1: error: function 'let' is initialized like a variable
main.c:1:10: error: 'Scanf' undeclared here (not in a function)
    1 | let () = Scanf.scanf "%d %d %d %d\n" @@ fun x y z k ->
      |          ^~~~~
main.c:1:22: error: expected ',' or ';' before string constant
    1 | let () = Scanf.scanf "%d %d %d %d\n" @@ fun x y z k ->
      |                      ^~~~~~~~~~~~~~~
main.c:1:38: error: stray '@' in program
    1 | let () = Scanf.scanf "%d %d %d %d\n" @@ fun x y z k ->
      |                                      ^
main.c:1:39: error: stray '@' in program
    1 | let () = Scanf.scanf "%d %d %d %d\n" @@ fun x y z k ->
      |                                       ^
main.c:2:26: error: stray '@' in program
    2 |   let as_ = Array.init x @@ fun _ -> Scanf.scanf "%d " @@ fun a -> a in
      |                          ^
main.c:2:27: error: stray '@' in program
    2 |   let as_ = Array.init x @@ fun _ -> Scanf.scanf "%d " @@ fun a -> a in
      |                           ^
main.c:2:56: error: stray '@' in program
    2 |   let as_ = Array.init x @@ fun _ -> Scanf.scanf "%d " @@ fun a -> a in
      |                                                        ^
main.c:2:57: error: stray '@' in program
    2 |   let as_ = Array.init x @@ fun _ -> Scanf.scanf "%d " @@ fun a -> a in
      |                                                         ^
main.c:3:25: error: stray '@' in program
    3 |   let bs = Array.init y @@ fun _ -> Scanf.scanf "%d " @@ fun b -> b in
      |                         ^
main.c:3:26: error: stray '@' in program
    3 |   let bs = Array.init y @@ fun _ -> Scanf.scanf "%d " @@ fun b -> b in
      |                          ^
main.c:3:55: error: stray '@' in program
    3 |   let bs = Array.init y @@ fun _ -> Scanf.scanf "%d " @@ fun b -> b in
      |                                                       ^
main.c:3:56: error: stray '@' in program
    3 |   let bs = Array.init y @@ fun _ -> Scanf.scanf "%d " @@ fun b -> b in
      |                                                        ^
main.c:4:25: error: stray '@' in program
    4 |   let cs = Array.init z @@ fun _ -> Scanf.scanf "%d " @@ fun c -> c in
      |                         ^
main.c:4:26: error: stray '@' in program
    4 |   let cs = Array.init z @@ fun _ -> Scanf.scanf "%d " @@ fun c -> c in
      |                          ^
main.c:4:55: error: stray '@' in program
    4 |   let cs = Array.init z @@ fun _ -> Scanf.scanf "%d " @@ fun c -> c in
      |                                                       ^
main.c:4:56: error: stray '@' in program
    4 |   let cs = Array.init z @@ fun _ -> Scanf.scanf "%d " @@ fun c -> c in
      |                                                        ^
main.c:5:22: warning: multi-character literal with 13 characters exceeds 'int' size of 4 bytes
    5 |   Array.sort (fun a a' -> compare a' a) as_;
      |                      ^~~~~~~~~~~~~~~
main.c:6:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    6 |   Array.sort (fun b b' -> compare b' b) bs;
      |        ^
main.c:6:22: warning: multi-character literal with 13 characters exceeds 'int' size of 4 bytes
    6 |   Array.sort (fun b b' -> compare b' b) bs;
      |                      ^~~~~~~~~~~~~~~
main.c:7:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    7 |   Array.sort (fun c c' -> compare c' c) cs;
      |        ^
main.c:7:22: warning: multi-character literal with 13 characters exceeds 'int' size of 4 bytes
    7 |   Array.sort (fun c c' -> compare c' c) cs;
      |                      ^~~~~~~~~~~~~~~
main.c:8:3: error: unknown type name 'let'
    8 |   let abcs =
      |   ^~~
main.c:9:5: error: 'Array' undeclared here (not in a function)
    9 |     Array.of_list @@
      |     ^~~~~
main.c:9:19: error: stray '@' in program
    9 |     Array.of_list @@
      |                   ^
main.c:9:20: error: stray '@' in program
    9 |     Array.of_list @@
      |                    ^
main.c:10:5: error: expected ',' or ';' before 'List'
   10 |     List.concat @@ Array.to_list @@ Array.init (min x k) @@ fun i ->
      |     ^~~~
main.c:10:17: error: stray '@' in program
   10 |     List.concat @@ Array.to_list @@ Array.init (min x k) @@ fun i ->
      |                 ^
main.c:10:18: error: stray '@' in program
   10 |     List.concat @@ Array.to_list @@ Array.init (min x k) @@ fun i ->
      |                  ^
main.c:10:34: error: stray '@' in program
   10 |     List.concat @@ Array.to_list @@ Array.init (min x k) @@ fun i ->
      |                                  ^
main.c:10:35: error: stray '@' in program
   10 |     List.concat @@ Array.to_list @@ Array.init (min x k) @@ fun i ->
      |                                   ^
main.c:10:58: error: stray '@' in program
   10 |     List.concat @@ Array.to_list @@ Array.init (min x k) @@ fun i ->
      |                                                          ^
main.c:10:59: error: stray '@' in program
   10 |     List.concat @@ Array.to_list @@ Array.init (min x k) @@ fun i ->
      |                                                           ^
main.c:11:19: error: stray '@' in program
   11 |       List.concat @@ Array.to_list @@ Array.init (min y (k / (i + 1))) @@ fun j ->
      |                   ^
main.c:11:20: error: stray '@' in program
   11 |       List.concat @@ Array.to_list @@ Array.init (min y (k / (i + 1))) @@ fun j ->
      |                    ^
main.c:11:36: error: stray '@' in program
   11 |       List.concat @@ Array.to_list @@ Array.init (min y (k / (i + 1))) @@ fun j ->
      |                                    ^
main.c:11:37: error: stray '@' in program
   11 |       List.concat @@ Array.to_list @@ Array.init (min y (k / (i + 1))) @@ fun j ->
      |                                     ^
main.c:11:72: error: stray '@' in program
   11 |       List.concat @@ Array.to_list @@ Array.init (min y (k / (i + 1))) @@ fun j ->
      |                                                                        ^
main.c:11:73: error: stray '@' in program
   11 |       List.concat @@ Array.to_list @@ Array.init (min y (k / (i + 1))) @@ fun j ->
      |                                                                         ^
main.c:12:23: error: stray '@' in program
   12 |         Array.to_list @@ Array.init (min z (k / (i + 1) / (j + 1))) @@ fun k ->
      |                       ^
main.c:12:24: error: stray '@' in program
   12 |         Array.to_list @@ Array.init (min z (k / (i + 1) / (j + 1))) @@ fun k ->
      |                        ^
main.c:12:69: error: stray '@' in program
   12 |         Array.to_list @@ Array.init (min z (k / (i + 1) / (j + 1))) @@ fun k ->
      |                                                                     ^
main.c:12:70: error: stray '@' in program
   12 |         Array.to_list @@ Array.init (min z (k / (i + 1) / (j + 1))) @@ fun k ->
      |                                                                      ^
main.c:14:26: warning: multi-character literal with 15 characters exceeds 'int' size of 4 bytes
   14 |   Array.sort (fun abc abc' -> compare abc' abc) abcs;
      |                          ^~~~~~~~~~~~~~~~~
main.c:15:3: error: expected identifier or '(' before 'for'
   15 |   for i = 0 to k - 1 do
      |   ^~~