Language: C++

#include<bits/stdc++.h>
#define int long long;
using namespace std;
const int mod=1e9+7;
int n,k,a[200001],ans=1;
bool cmp(int x,int y)
{
	return x>y; 
}
int main()
{
	scanf("%lld%lld",&n,&k);
	for(int i=1;i<=n;i++)
	{
		scanf("%lld",&a[i]);
		a[i]=(a[i]+mod)%mod;
	}
	sort(a+1,a+1+n,cmp);
	for(int i=1;i<=k;i++)
		ans=(ans*a[i])%mod;
	cout<<ans;
	return 0;
}

Compiler output:
a.cc:2:18: error: declaration does not declare anything [-fpermissive]
    2 | #define int long long;
      |                  ^~~~
a.cc:4:7: note: in expansion of macro 'int'
    4 | const int mod=1e9+7;
      |       ^~~
a.cc:4:11: error: 'mod' does not name a type
    4 | const int mod=1e9+7;
      |           ^~~
a.cc:2:18: error: declaration does not declare anything [-fpermissive]
    2 | #define int long long;
      |                  ^~~~
a.cc:5:1: note: in expansion of macro 'int'
    5 | int n,k,a[200001],ans=1;
      | ^~~
a.cc:5:5: error: 'n' does not name a type
    5 | int n,k,a[200001],ans=1;
      |     ^
a.cc:2:22: error: expected ')' before ';' token
    2 | #define int long long;
      |                      ^
a.cc:6:10: note: in expansion of macro 'int'
    6 | bool cmp(int x,int y)
      |          ^~~
a.cc:6:9: note: to match this '('
    6 | bool cmp(int x,int y)
      |         ^
a.cc:6:14: error: 'x' does not name a type
    6 | bool cmp(int x,int y)
      |              ^
a.cc:6:20: error: 'y' does not name a type
    6 | bool cmp(int x,int y)
      |                    ^
a.cc:2:18: error: declaration does not declare anything [-fpermissive]
    2 | #define int long long;
      |                  ^~~~
a.cc:10:1: note: in expansion of macro 'int'
   10 | int main()
      | ^~~
a.cc:10:5: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   10 | int main()
      |     ^~~~
a.cc: In function 'int main()':
a.cc:12:27: error: 'n' was not declared in this scope; did you mean 'yn'?
   12 |         scanf("%lld%lld",&n,&k);
      |                           ^
      |                           yn
a.cc:12:30: error: 'k' was not declared in this scope
   12 |         scanf("%lld%lld",&n,&k);
      |                              ^
a.cc:2:18: error: declaration does not declare anything [-fpermissive]
    2 | #define int long long;
      |                  ^~~~
a.cc:13:13: note: in expansion of macro 'int'
   13 |         for(int i=1;i<=n;i++)
      |             ^~~
a.cc:13:17: error: 'i' was not declared in this scope
   13 |         for(int i=1;i<=n;i++)
      |                 ^
a.cc:13:25: error: expected ')' before ';' token
   13 |         for(int i=1;i<=n;i++)
      |            ~            ^
      |                         )
a.cc:13:26: error: 'i' was not declared in this scope
   13 |         for(int i=1;i<=n;i++)
      |                          ^
a.cc:18:14: error: 'a' was not declared in this scope
   18 |         sort(a+1,a+1+n,cmp);
      |              ^
a.cc:2:18: error: declaration does not declare anything [-fpermissive]
    2 | #define int long long;
      |                  ^~~~
a.cc:19:13: note: in expansion of macro 'int'
   19 |         for(int i=1;i<=k;i++)
      |             ^~~
a.cc:19:25: error: expected ')' before ';' token
   19 |         for(int i=1;i<=k;i++)
      |            ~            ^
      |                         )
a.cc:21:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   21 |         cout<<ans;
      |               ^~~
      |               abs