Language: C++

import std.stdio;
import std.c.stdio;
import std.range;
import std.array;
import std.functional;
import std.algorithm;
import std.conv;
import std.container;
import std.math;
import std.numeric;
import std.string;
import std.c.string;
import std.regex;
import std.typecons;
 
void main() {
    int n, k; 
    int[] x;
    bool input() {
        scanf("%d %d\n", &n, &k);
        if (n == 0 && k == 0) return false;
        x = new int[n];
        foreach (i; 0 .. n) {
            scanf("%d\n", &x[i]);
        }
        return true;
    }

    void solve() {
        int MaxPoint() {
            int CalcK(int i) {
                if (i + k > n) return 0;
                int Ret = 1;
                foreach (j; 0 .. k) {
                    Ret *= x[i + j];
                }
                return Ret;
            }
            int ck = 0;
            foreach (i; 0 .. n) {
                ck = max(ck, CalcK(i));
            }
            return ck;
        }

        int Ans = int.min;
        int o = MaxPoint;
        foreach (i; 0 .. n) {
            foreach (j; i + 1 .. n) {
                swap(x[i], x[j]);
                Ans = max(Ans, MaxPoint);
                swap(x[j], x[i]);
            }
        }
        writeln(Ans - o);
    }

    while (input) solve;
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import std.stdio;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import std.c.stdio;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import std.range;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import std.array;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import std.functional;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import std.algorithm;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: 'import' does not name a type
    7 | import std.conv;
      | ^~~~~~
a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: 'import' does not name a type
    8 | import std.container;
      | ^~~~~~
a.cc:8:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:9:1: error: 'import' does not name a type
    9 | import std.math;
      | ^~~~~~
a.cc:9:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:10:1: error: 'import' does not name a type
   10 | import std.numeric;
      | ^~~~~~
a.cc:10:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:11:1: error: 'import' does not name a type
   11 | import std.string;
      | ^~~~~~
a.cc:11:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:12:1: error: 'import' does not name a type
   12 | import std.c.string;
      | ^~~~~~
a.cc:12:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:13:1: error: 'import' does not name a type
   13 | import std.regex;
      | ^~~~~~
a.cc:13:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:14:1: error: 'import' does not name a type
   14 | import std.typecons;
      | ^~~~~~
a.cc:14:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:16:1: error: '::main' must return 'int'
   16 | void main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:18:8: error: structured binding declaration cannot have type 'int'
   18 |     int[] x;
      |        ^~
a.cc:18:8: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:18:8: error: empty structured binding declaration
a.cc:18:11: error: expected initializer before 'x'
   18 |     int[] x;
      |           ^
a.cc:19:15: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   19 |     bool input() {
      |               ^~
a.cc:19:15: note: remove parentheses to default-initialize a variable
   19 |     bool input() {
      |               ^~
      |               --
a.cc:19:15: note: or replace parentheses with braces to value-initialize a variable
a.cc:19:18: error: a function-definition is not allowed here before '{' token
   19 |     bool input() {
      |                  ^
a.cc:29:18: error: a function-definition is not allowed here before '{' token
   29 |     void solve() {
      |                  ^
a.cc:58:12: error: 'input' was not declared in this scope; did you mean 'int'?
   58 |     while (input) solve;
      |            ^~~~~
      |            int
a.cc:58:19: error: 'solve' was not declared in this scope
   58 |     while (input) solve;
      |                   ^~~~~