Language: C++

#pragma comment(linker, "/STACK:1024000000,1024000000")
#include<algorithm>
#include<iostream>
#include<cstring>
#include<fstream>
#include<bitset>
#include<cstdio>
#include<string>
#include<vector>
#include<cmath>
#include<queue>
#include<stack>
#include<map>
#include<set>
#define INF 0X3F3F3F3F
#define N 100505
#define M 200005
#define LL long long
#define FF(i,a,b) for(int i=a;i<=b;++i)
#define RR(i,a,b) for(int i=a;i>=b;--i)
#define FJ(i,a,b) for(int i=a;i<b;++i)
#define SC(x) scanf("%d",&x)
#define SCC(x,y) scanf("%d%d",&x,&y)
#define SCCC(x,y,z) scanf("%d%d%d",&x,&y,&z)
#define SS(x) scanf("%s",x)
#define PR(x) printf("%d\n",x)
#define CL(a, x) memset(a, x, sizeof(a))
#define _q fd[rt]
#define _l fd[rt<<1]
#define _r fd[rt<<1|1]
#define MID int mid=((l+r)>>1)
#define lson rt<<1,l,mid
#define rson rt<<1|1,mid+1,r
#define PB push_back
#define SZ size
#define PII pair<int,int>
#define PLL pair<long long,long long>
#define MP make_pair
#define IN freopen("in.txt","r",stdin)
#define OUT freopen("out.txt","w",stdout)
using namespace std;
const int MOD=1000000007;
const double PI=acos(-1.0);
const double EPS=1e-8;
int n, xn, yn;
LL x[N], y[N];
int main(){
    //IN;
    SCC(xn, yn);
    FF(i, 1, xn)scanf("%lld", &x[i]);
    FF(i, 1, yn)scanf("%lld", &y[i]);
    sort(x + 1, x + 1 + xn);
    sort(y + 1, y + 1 + yn);
    LL Y = 0;
    FF(i, 1, yn - 1){
        Y = (Y + 1LL * i * (yn - i) % MOD * (y[i + 1] - y[i])) % MOD;
    }
    LL s = 0;
    FF(i, 1, xn - 1){
        s = (s + Y * i % MOD * (xn - i) % MOD * (x[i + 1] - x[i])) % MOD;
    }
    printf("%lld\n", s);
    return 0;
}


Compiler output:
a.cc:45:12: error: 'int yn' redeclared as different kind of entity
   45 | int n, xn, yn;
      |            ^~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
                 from /usr/include/c++/14/bits/stl_algobase.h:59,
                 from /usr/include/c++/14/algorithm:60,
                 from a.cc:2:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:258:1: note: previous declaration 'double yn(int, double)'
  258 | __MATHCALL (yn,, (int, _Mdouble_));
      | ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:19:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 | #define FF(i,a,b) for(int i=a;i<=b;++i)
      |                                ^
a.cc:51:5: note: in expansion of macro 'FF'
   51 |     FF(i, 1, yn)scanf("%lld", &y[i]);
      |     ^~
a.cc:53:23: error: invalid operands of types 'long long int*' and 'double(int, double) noexcept' to binary 'operator+'
   53 |     sort(y + 1, y + 1 + yn);
      |                 ~~~~~ ^ ~~
      |                   |     |
      |                   |     double(int, double) noexcept
      |                   long long int*
a.cc:55:17: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   55 |     FF(i, 1, yn - 1){
      |              ~~~^~~
a.cc:19:34: note: in definition of macro 'FF'
   19 | #define FF(i,a,b) for(int i=a;i<=b;++i)
      |                                  ^
a.cc:19:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 | #define FF(i,a,b) for(int i=a;i<=b;++i)
      |                                ^
a.cc:55:5: note: in expansion of macro 'FF'
   55 |     FF(i, 1, yn - 1){
      |     ^~
a.cc:56:32: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   56 |         Y = (Y + 1LL * i * (yn - i) % MOD * (y[i + 1] - y[i])) % MOD;
      |                             ~~~^~~
a.cc:56:26: error: invalid operands of types 'long long int' and 'double (*)(int, double) noexcept' to binary 'operator*'
   56 |         Y = (Y + 1LL * i * (yn - i) % MOD * (y[i + 1] - y[i])) % MOD;
      |                  ~~~~~~~ ^ ~~~~~~~~
      |                      |         |
      |                      |         double (*)(int, double) noexcept
      |                      long long int