Language: C++

v#include <bits/stdc++.h>

#define rep(i, n) for (int i = 0; i < int(n); i++)
#define rrep(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define reps(i, n) for (int i = 1; i <= int(n); i++)
#define rreps(i, n) for (int i = int(n); i >= 1; i--)
#define repi(i, a, b) for (int i = int(a); i < int(b); i++)
#define each(x, y) for (auto &x : y)
#define all(a) (a).begin(), (a).end()
#define bit(b) (1ll << (b))
#define uniq(v) (v).erase(unique(all(v)), (v).end())
#define rsort(v) sort(all(v)); reverse(all(v))

using namespace std;

using i32 = int;
using i64 = long long;
using f80 = long double;
using vi32 = vector<i32>;
using vi64 = vector<i64>;
using vf80 = vector<f80>;
using vstr = vector<string>;

inline void yes() { cout << "Yes" << '\n'; exit(0); }
inline void no() { cout << "No" << '\n'; exit(0); }
inline i64 gcd(i64 a, i64 b) { if (min(a, b) == 0) return max(a, b); if (a % b == 0) return b; return gcd(b, a % b); }
inline i64 lcm(i64 a, i64 b) { return a / gcd(a, b) * b; }
void solve(); int main() { ios::sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(16); solve(); return 0; }
template<typename T> class pqasc : public priority_queue<T, vector<T>, greater<T>> {};
template<typename T> class pqdesc : public priority_queue<T, vector<T>, less<T>> {};
template<typename T> inline void amax(T &x, T y) { if (x < y) x = y; }
template<typename T> inline void amin(T &x, T y) { if (x > y) x = y; }
template<typename T> inline T power(T x, i64 n) { T r = 1; while (n > 0) { if (n & 1) r *= x; x *= x; n >>= 1; } return r; }
template<typename T> istream& operator>>(istream &is, vector<T> &v) { for (auto &x : v) is >> x; return is; }
template<typename T> ostream& operator<<(ostream &os, const vector<T> &v) { rep(i, v.size()) { if (i) os << ' '; os << v[i]; } return os; }

template<int mod>
struct ModInt {
  int x;
  ModInt(): x(0) {}
  ModInt(int a) { x = a % mod; if (x < 0) x += mod; }
  ModInt &operator+=(ModInt that) { x = (x + that.x) % mod; return *this; }
  ModInt &operator-=(ModInt that) { x = (x + mod - that.x) % mod; return *this; }
  ModInt &operator*=(ModInt that) { x = (i64) x * that.x % mod; return *this; }
  ModInt &operator/=(ModInt that) { return *this *= that.inverse(); }
  ModInt operator-() { return ModInt(-this->x); }
  friend ostream& operator<<(ostream &os, ModInt m) { return os << m.x; }
  ModInt inverse() {
    int a = x, b = mod, u = 1, v = 0;
    while (b) { int t = a / b; a -= t * b; u -= t * v; swap(a, b); swap(u, v); }
    return ModInt(u);
  }
  #define op(o, p) ModInt operator o(ModInt that) { return ModInt(*this) p that; }
    op(+, +=) op(-, -=) op(*, *=) op(/, /=)
  #undef op
  #define op(o) bool operator o(ModInt that) const { return x o that.x; }
    op(==) op(!=) op(<) op(<=) op(>) op(>=)
  #undef op
};

using mint = ModInt<1000000007>;

void solve() {
  int n, m; cin >> n >> m;
  vi32 x(n), y(m); cin >> x >> y;
  mint ansx = 0, ansy = 0;
  reps(i, n - 1) {
    ansx += ((mint) n * i - (mint) i * i) * (x[i] - x[i - 1]);
  }
  reps(i, m - 1) {
    ansy += ((mint) m * i - (mint) i * i) * (y[i] - y[i - 1]);
  }
  cout << ansx * ansy << '\n';
}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include <bits/stdc++.h>
      | ^
a.cc:19:14: error: 'vector' does not name a type
   19 | using vi32 = vector<i32>;
      |              ^~~~~~
a.cc:20:14: error: 'vector' does not name a type
   20 | using vi64 = vector<i64>;
      |              ^~~~~~
a.cc:21:14: error: 'vector' does not name a type
   21 | using vf80 = vector<f80>;
      |              ^~~~~~
a.cc:22:14: error: 'vector' does not name a type
   22 | using vstr = vector<string>;
      |              ^~~~~~
a.cc: In function 'void yes()':
a.cc:24:21: error: 'cout' was not declared in this scope
   24 | inline void yes() { cout << "Yes" << '\n'; exit(0); }
      |                     ^~~~
a.cc:24:44: error: 'exit' was not declared in this scope
   24 | inline void yes() { cout << "Yes" << '\n'; exit(0); }
      |                                            ^~~~
a.cc:1:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
  +++ |+#include <cstdlib>
    1 | v#include <bits/stdc++.h>
a.cc: In function 'void no()':
a.cc:25:20: error: 'cout' was not declared in this scope
   25 | inline void no() { cout << "No" << '\n'; exit(0); }
      |                    ^~~~
a.cc:25:42: error: 'exit' was not declared in this scope
   25 | inline void no() { cout << "No" << '\n'; exit(0); }
      |                                          ^~~~
a.cc:25:42: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
a.cc: In function 'i64 gcd(i64, i64)':
a.cc:26:36: error: 'min' was not declared in this scope
   26 | inline i64 gcd(i64 a, i64 b) { if (min(a, b) == 0) return max(a, b); if (a % b == 0) return b; return gcd(b, a % b); }
      |                                    ^~~
a.cc:26:59: error: 'max' was not declared in this scope
   26 | inline i64 gcd(i64 a, i64 b) { if (min(a, b) == 0) return max(a, b); if (a % b == 0) return b; return gcd(b, a % b); }
      |                                                           ^~~
a.cc: In function 'int main()':
a.cc:28:28: error: 'ios' has not been declared
   28 | void solve(); int main() { ios::sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(16); solve(); return 0; }
      |                            ^~~
a.cc:28:53: error: 'cin' was not declared in this scope
   28 | void solve(); int main() { ios::sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(16); solve(); return 0; }
      |                                                     ^~~
a.cc:28:65: error: 'cout' was not declared in this scope
   28 | void solve(); int main() { ios::sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(16); solve(); return 0; }
      |                                                                 ^~~~
a.cc:28:73: error: 'fixed' was not declared in this scope
   28 | void solve(); int main() { ios::sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(16); solve(); return 0; }
      |                                                                         ^~~~~
a.cc:28:82: error: 'setprecision' was not declared in this scope
   28 | void solve(); int main() { ios::sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(16); solve(); return 0; }
      |                                                                                  ^~~~~~~~~~~~
a.cc: At global scope:
a.cc:29:57: error: expected template-name before '<' token
   29 | template<typename T> class pqasc : public priority_queue<T, vector<T>, greater<T>> {};
      |                                                         ^
a.cc:29:57: error: expected '{' before '<' token
a.cc:30:58: error: expected template-name before '<' token
   30 | template<typename T> class pqdesc : public priority_queue<T, vector<T>, less<T>> {};
      |                                                          ^
a.cc:30:58: error: expected '{' before '<' token
a.cc:34:22: error: 'istream' does not name a type
   34 | template<typename T> istream& operator>>(istream &is, vector<T> &v) { for (auto &x : v) is >> x; return is; }
      |                      ^~~~~~~
a.cc:35:22: error: 'ostream' does not name a type
   35 | template<typename T> ostream& operator<<(ostream &os, const vector<T> &v) { rep(i, v.size()) { if (i) os << ' '; os << v[i]; } return os; }
      |                      ^~~~~~~
a.cc:47:10: error: 'ostream' does not name a type
   47 |   friend ostream& operator<<(ostream &os, ModInt m) { return os << m.x; }
      |          ^~~~~~~
a.cc: In member function 'ModInt<mod> ModInt<mod>::inverse()':
a.cc:50:56: error: there are no arguments to 'swap' that depend on a template parameter, so a declaration of 'swap' must be available [-fpermissive]
   50 |     while (b) { int t = a / b; a -= t * b; u -= t * v; swap(a, b); swap(u, v); }
      |                                                        ^~~~
a.cc:50:56: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
a.cc:50:68: error: there are no arguments to 'swap' that depend on a template parameter, so a declaration of 'swap' must be available [-fpermissive]
   50 |     while (b) { int t = a / b; a -= t * b; u -= t * v; swap(a, b); swap(u, v); }
      |                                                                    ^~~~
a.cc: In function 'void solve()':
a.cc:64:13: error: 'cin' was not declared in this scope
   64 |   int n, m; cin >> n >> m;
      |             ^~~
a.cc:65:3: error: 'vi32' was not declared in this scope; did you mean 'i32'?
   65 |   vi32 x(n), y(m); cin >> x >> y;
      |   ^~~~
      |   i32
a.cc:65:27: error: 'x' was not declared in this scope
   65 |   vi32 x(n), y(m); cin >> x >> y;
      |                           ^
a.cc:65:32: error: 'y' was not declared in this scope
   65 |   vi32 x(n), y(m); cin >> x >> y;
      |                                ^
a.cc:73:3: error: 'cout' was not declared in this scope
   73 |   cout << ansx * ansy << '\n';
      |   ^~~~