Problem:
C: オセロ
問題
オセロの盤面を用意する. 盤面は左上が $(1,1)$ , 右下が $(8,8)$ と表記する. ここで用意する盤面は, 以下のように, $(5,4)$ の黒の石がない.
........
........
........
...ox...
....o...
........
........
........
黒石:x 白石:o
8x8の盤面
この状態から, 黒が先手でオセロを開始する.
AORイカちゃんは, 以下のルールで $q$ 回遊ぶ.
左上を $a$ 行目 $b$ 列目のマス, 右下を $c$ 行目 $d$ 列目のマスとした, マス目に沿った長方形領域が与えられる.
AORイカちゃんは, この長方形領域に含まれる石の数を最大化するように, オセロのルール(参考:
Wikipedia　オセロ
)にのっとり黒石と白石を交互に置いていく.
これ以上石が置けなくなったとき(白石黒石ともにパスするしかない状態やすべての盤面が埋まった状態のとき), ゲームを終了する.
それぞれのゲームで, その領域に含まれる石の数を最大化したときの石の数を出力せよ.
なお, 入力や出力の回数が多くなることがあるため, 入出力には高速な関数を用いることを推奨する.
制約
$1 \leq q \leq 10^{5}$
$1 \leq a \leq c \leq 8$
$1 \leq b \leq d \leq 8$
入力形式
入力は以下の形式で与えられる.
$q$
$a_1\ b_1\ c_1\ d_1$
$a_2\ b_2\ c_2\ d_2$
$\vdots$
$a_q\ b_q\ c_q\ d_q$
出力
それぞれのゲームで, その領域に含まれる, 石の数を最大化したときの石の数を出力せよ. また, 末尾に改行も出力せよ.
サンプル
サンプル入力 1
3
1 1 8 8
2 4 3 8
8 8 8 8
サンプル出力 1
48
7
1

Submitted solutions:

code_snippet: #include <iostream>
#include <vector>
using namespace std;



int main(){
	int q;cin>>q;
	for(int z = 0; q > z; z++){
		int a,b,c,d;cin>>a>>b>>c>>d;
		int ans = 0;
		for(int i = a; c >= i; i++){
			for(int j = b; d >= j; j++){
				if(i%2 == 1 && j%2 == 0)ans++;
			}
		}
		cout << (c-a+1)*(d-b+1)-ans << "\n";
	}
}
accuracy: 1
time_ms: 90
memory_kb: 3440
final_rank: 18

code_snippet: #include <bits/stdc++.h>
using namespace std;
constexpr int N = 8;
using State = array<array<int, N>, N>;
const int di[] = {0, 1, 0, -1, 1, 1, -1, -1};
const int dj[] = {1, 0, -1, 0, 1, -1, 1, -1};

/*
o.o.o.o.                                                                                                 
oxxxxoxx                                                                                                 
o.x.o.x.                                                                                                 
oxxoooxo                                                                                                 
o.x.x.x.                                                                                                 
ooxoxoxo                                                                                                 
o.x.o.x.                                                                                                 
ooxxxooo
*/

int main() {
    int n;
    cin >> n;

    while (n--) {
        int a, b, c, d;
        scanf("%d%d%d%d", &a, &b, &c, &d);
        int ans = 0;
        for(int i = a; i <= c; i++) {
            for (int j = b; j <= d; j++) {
                if (i % 2 == 1 && j % 2 == 0) continue;
                ans++;
            }
        }
        cout << ans << '\n';
    }
}
accuracy: 1
time_ms: 20
memory_kb: 3504
final_rank: 13

code_snippet: #include <iostream>
#include <vector>
using namespace std;



int main(){
	int q;cin>>q;
	for(int z = 0; q > z; z++){
		int a,b,c,d;cin>>a>>b>>c>>d;
		int ans = 0;
		for(int i = a; c >= i; i++){
			for(int j = b; d >= j; j++){
				if(i%2 == 1 && j%2 == 0)ans++;
			}
		}
		cout << (c-a+1)*(d-b+1)-ans << "\n";
	}
}
accuracy: 1
time_ms: 90
memory_kb: 3444
final_rank: 20

code_snippet: #include <bits/stdc++.h>
using namespace std;

int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);

  int st[8][8] = {};
  for (int i = 0; i < 8; i++) {
    for (int j = 0; j < 8; j++) {
      if (i%2 == 0 && j%2 == 1) st[i][j] = 0;
      else st[i][j] = 1;
    }
  }

  int q;
  int a, b, c, d;

  cin >> q;
  while (q--) {
    cin >> a >> b >> c >> d;
    int ans = 0;
    for (int i = a - 1; i < c; i++) {
      for (int j = b - 1; j < d; j++) {
        // cout << i << ' ' << j << endl;
        // cout << ans << ' ' << st[i][j] << endl;
        ans += st[i][j];
      }
    }

    cout << ans << endl;
  }
}
accuracy: 1
time_ms: 80
memory_kb: 3460
final_rank: 17

code_snippet: #include<bits/stdc++.h>
using namespace std;
#define MOD 1000000007
//#define MOD 998244353
#define INF 1000000010
#define EPS 1e-9
#define F first
#define S second

#define debug(x) cout<<x<<endl;
#define repi(i,x,n) for(int i=x;i<n;i++)
#define rep(i,n) repi(i,0,n)
#define lp(i,n) repi(i,0,n)
#define repn(i,n) for(int i=n;i>=0;i--)
#define int long long
#define endl "\n"

typedef pair<int,int> PII;
typedef pair<int,string> PIS;
typedef pair<string,int> PSI;

template <typename T>
bool chmax(T &a, const T& b) {
  if (a < b) {
    a = b; 
    return true;
  }
  return false;
}

template <typename T>
bool chmin(T &a, const T& b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}


string s[8]={
  "x.x.x.x.",
  "xxxxxxxx",
  "x.x.x.x.",
  "xxxxxxxx",
  "x.x.x.x.",
  "xxxxxxxx",
  "x.x.x.x.",
  "xxxxxxxx"
};

signed main(){
    int q;
    cin>>q;
    rep(t,q){
      int a,b,c,d;
      cin>>a>>b>>c>>d;
      a--;b--;c--;d--;
      int cnt=0;
      for(int i=a;i<=c;i++){
        for(int j=b;j<=d;j++){
          if(s[i][j]=='x') cnt++; 
        }
      }
      cout<<cnt<<endl;
    }
    
}
accuracy: 1
time_ms: 90
memory_kb: 3440
final_rank: 18

code_snippet: #pragma GCC optimize("Ofast")
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
#include <cstdio>
#include <ctime>
#include <assert.h>
#include <chrono>
#include <random>
#include <numeric>
#include <set>
#include <deque>
#include <stack>
#include <sstream>
#include <utility>
#include <cstring>
#include <unordered_map>
#include <unordered_set>
#include <tuple>
#include <array>
#include <bitset>
using namespace std;
typedef long long int ll;
typedef unsigned long long ull;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) {
    return (ull)rng() % B;
}
inline ll time() {
    return static_cast<long double>(chrono::duration_cast<chrono::nanoseconds>(chrono::steady_clock::now().time_since_epoch()).count()) * 1e-9;
}

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int q; cin >> q;
    while(q--){
        int a,b,c,d; cin >> a >> b >> c >> d;
        a--; b--;
        int res = 0;
        for(int i=a;i<c;i++){
            for(int j=b;j<d;j++){
                if(i%2 != 0 or j%2 != 1)res++;
            }
        }
        cout << res << "\n";
    }
}
accuracy: 1
time_ms: 10
memory_kb: 3468
final_rank: 5

code_snippet: #include <bits/stdc++.h>
//#include <atcoder/all>
//using namespace atcoder;
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
using namespace std;
 
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<int, int> pii;
typedef pair<long long, long long> PLL;
typedef pair<int, PII> TIII;
 
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
 
 
#define FOR(i, s, n) for (int i = s; i < (int)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define trav(a, x) for (auto &a : x)
#define all(x) x.begin(), x.end()
 
#define MOD 1000000007
 
template<class T1, class T2> inline bool chmax(T1 &a, T2 b) {if (a < b) {a = b; return true;} return false;}
template<class T1, class T2> inline bool chmin(T1 &a, T2 b) {if (a > b) {a = b; return true;} return false;}
const double EPS = 1e-8, PI = acos(-1);
const double pi = 3.141592653589793238462643383279;
//ここから編集    
typedef string::const_iterator State;
ll GCD(ll a, ll b){
  return (b==0)?a:GCD(b, a%b);
}
ll LCM(ll a, ll b){
  return a/GCD(a, b) * b;
}
template< int mod >
struct ModInt {
  int x;
 
  ModInt() : x(0) {}
 
  ModInt(int64_t y) : x(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {}
 
  ModInt &operator+=(const ModInt &p) {
    if((x += p.x) >= mod) x -= mod;
    return *this;
  }
 
  ModInt &operator-=(const ModInt &p) {
    if((x += mod - p.x) >= mod) x -= mod;
    return *this;
  }
 
  ModInt &operator*=(const ModInt &p) {
    x = (int) (1LL * x * p.x % mod);
    return *this;
  }
 
  ModInt &operator/=(const ModInt &p) {
    *this *= p.inverse();
    return *this;
  }
 
  ModInt operator-() const { return ModInt(-x); }
 
  ModInt operator+(const ModInt &p) const { return ModInt(*this) += p; }
 
  ModInt operator-(const ModInt &p) const { return ModInt(*this) -= p; }
 
  ModInt operator*(const ModInt &p) const { return ModInt(*this) *= p; }
 
  ModInt operator/(const ModInt &p) const { return ModInt(*this) /= p; }
 
  bool operator==(const ModInt &p) const { return x == p.x; }
 
  bool operator!=(const ModInt &p) const { return x != p.x; }
 
  ModInt inverse() const {
    int a = x, b = mod, u = 1, v = 0, t;
    while(b > 0) {
      t = a / b;
      swap(a -= t * b, b);
      swap(u -= t * v, v);
    }
    return ModInt(u);
  }
 
  ModInt pow(int64_t n) const {
    ModInt ret(1), mul(x);
    while(n > 0) {
      if(n & 1) ret *= mul;
      mul *= mul;
      n >>= 1;
    }
    return ret;
  }
 
  friend ostream &operator<<(ostream &os, const ModInt &p) {
    return os << p.x;
  }
 
  friend istream &operator>>(istream &is, ModInt &a) {
    int64_t t;
    is >> t;
    a = ModInt< mod >(t);
    return (is);
  }
 
  static int get_mod() { return mod; }
};
 
using modint = ModInt< 1000000007 >;
template< typename T >
struct Combination {
  vector< T > _fact, _rfact, _inv;
 
  Combination(int sz) : _fact(sz + 1), _rfact(sz + 1), _inv(sz + 1) {
    _fact[0] = _rfact[sz] = _inv[0] = 1;
    for(int i = 1; i <= sz; i++) _fact[i] = _fact[i - 1] * i;
    _rfact[sz] /= _fact[sz];
    for(int i = sz - 1; i >= 0; i--) _rfact[i] = _rfact[i + 1] * (i + 1);
    for(int i = 1; i <= sz; i++) _inv[i] = _rfact[i] * _fact[i - 1];
  }
 
  inline T fact(int k) const { return _fact[k]; }
 
  inline T rfact(int k) const { return _rfact[k]; }
 
  inline T inv(int k) const { return _inv[k]; }
 
  T P(int n, int r) const {
    if(r < 0 || n < r) return 0;
    return fact(n) * rfact(n - r);
  }
 
  T C(int p, int q) const {
    if(q < 0 || p < q) return 0;
    return fact(p) * rfact(q) * rfact(p - q);
  }
 
  T H(int n, int r) const {
    if(n < 0 || r < 0) return (0);
    return r == 0 ? 1 : C(n + r - 1, r);
  }
};
 
ll modpow(ll x, ll n, ll mod) {
  ll res = 1;
  x %= mod;
  if(x == 0) return 0;
  while(n) {
    if(n&1) res = (res * x) % mod;
    x = (x * x) % mod;
    n >>= 1;
  }
  return res;
} 
inline long long mod(long long a, long long m) {
    return (a % m + m) % m;
}
template<typename T> 
struct BIT{
  int N;
  std::vector<T> node;
  BIT(){}
  BIT(int n){
    N = n;
    node.resize(N+10);
  }
  void build(int n) {
    N = n;
    node.resize(N+10);
  }
  /* a: 1-indexed */
  void add(int a, T x){
    for(int i=a; i<(int)node.size(); i += i & -i) node[i] += x;
  }

  /* [1, a] */
  T sum(int a){
    T res = 0;
    for(int x=a; x>0; x -= x & -x) res += node[x];
    return res;
  }

  /* [l, r] */
  T rangesum(int l, int r){
    return sum(r) - sum(l-1);
  }

  /* 
    a1+a2+...+aw >= valとなるような最小のwを返す
    @verify https://codeforces.com/contest/992/problem/E
  */
  int lower_bound(T val) {
    if(val < 0) return 0;

    int res = 0;
    int n = 1; 
    while (n < N) n *= 2;

    T tv=0;
    for (int k = n; k > 0; k /= 2) {
      if(res + k < N && node[res + k] < val){
        val -= node[res+k];
        res += k;
      }
    }
    return res+1; 
  }
};
struct UnionFind{
  std::vector<int> par;
  std::vector<int> siz;

  UnionFind(int sz_): par(sz_), siz(sz_) {
    for(int i=0; i<sz_; ++i) par[i] = i, siz[i] = 1;
  }

  void init(int sz_){
    par.resize(sz_);
    siz.resize(sz_);
    for(int i=0; i<sz_; ++i) par[i] = i, siz[i] = 1;
  }

  int root(int x){
    if(x == par[x]) return x;
    return par[x] = root(par[x]);
  }

  bool merge(int x, int y){
    x = root(x), y = root(y);
    if(x == y) return false;
    if(siz[x] < siz[y]) std::swap(x, y);
    siz[x] += siz[y];
    par[y] = x;
    return true;
  }

  bool issame(int x, int y){
    return root(x) == root(y);
  }

  int size(int x){
    return siz[root(x)];
  }
};
struct RollingHash{

    using ull = unsigned long long;
    const ull mod = (1ULL << 61) - 1;
    const ull MASK30 = (1ULL << 30) - 1;
    const ull MASK31 = (1ULL << 31) - 1;

    const ull MASK61 = mod;

    ull base;
    int n;
    vector<ull> hash, pow;

    RollingHash(const string &s)
    {
        random_device rnd;
        mt19937_64 mt(rnd());
        base = 1001;
        
        n = (int)s.size();
        hash.assign(n+1, 0);
        pow.assign(n+1, 1);
        
        for(int i=0; i<n; i++){
            hash[i+1] = calc_mod(mul(hash[i], base) + s[i]);
            pow[i+1] = calc_mod(mul(pow[i], base));
        }
    }

    ull calc_mod(ull x){
        ull xu = x >> 61;
        ull xd = x & MASK61;
        ull res = xu + xd;
        if(res >= mod) res -= mod;
        return res;
    }

    ull mul(ull a, ull b){
        ull au = a >> 31;
        ull ad = a & MASK31;
        ull bu = b >> 31;
        ull bd = b & MASK31;
        ull mid = ad * bu + au * bd;
        ull midu = mid >> 30;
        ull midd = mid & MASK30;
        return calc_mod(au * bu * 2 + midu + (midd << 31) + ad * bd);
    }

    //[l,r)のハッシュ値
    inline ull get(int l, int r){
        ull res = calc_mod(hash[r] + mod*3-mul(hash[l], pow[r-l]));
        return res;
    }
    //string tのハッシュ値
    inline ull get(string t){
        ull res = 0;
        for(int i=0; i<t.size(); i++){
            res = calc_mod(mul(res, base)+t[i]);
        }
        return res;
    }
    //string s中のtの数をカウント
    inline int count(string t) {
        if(t.size() > n) return 0;
        auto hs = get(t);
        int res = 0;
        for(int i=0; i<n-t.size()+1; i++){
            if(get(i, i+t.size()) == hs) res++; 
        }
        return res;
    }

    /* 
        concat 
        @verify https://codeforces.com/problemset/problem/514/C
    */
    inline ull concat(ull h1, ull h2, int h2len){
      return calc_mod(h2 + mul(h1, pow[h2len]));
    }

    // LCPを求める S[a:] T[b:]
    inline int LCP(int a, int b){
        int len = min((int)hash.size()-a, (int)hash.size()-b);
        
        int lb = -1, ub = len;
        while(ub-lb>1){
            int mid = (lb+ub)/2;

            if(get(a, a+mid) == get(b, b+mid)) lb = mid;
            else ub = mid;
        }
        return lb;
    }
};
int arr[8][8];
int main() {  
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(12);
  
  for(int i=1; i<8; i+=2) {
    REP(j,8) arr[i][j] = 1;
  }
  for(int i=0; i<8; i+=2) {
    REP(j,8) arr[j][i] = 1;
  }
  int q; cin >> q;
  while(q--) {
    int a, b, c, d; cin >> a >> b >> c >> d;
    a--; b--; c--; d--;
    int t = 0;
    for(int i=a; i<=c; i++) {
      for(int j=b; j<=d; j++) t += arr[i][j];
    }
    cout << t << '\n';
  }
  return 0;
}
accuracy: 1
time_ms: 10
memory_kb: 3456
final_rank: 4

code_snippet: #include <cmath>
#include <vector>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <algorithm>
#include <set>
#include <queue>
#include <string>
#include <map>
#include <stack>
#include <climits>
#include <array>
#include <unordered_set>
#include <unordered_map>
#include <memory>
#include <functional>
#include <cfloat>
#include <numeric>
#include <random>
#include <sstream>
#include <bitset>
#include <complex>
#include <chrono>
#include <cassert>


int main() {
	std::vector<std::vector<int>> sum(9, std::vector<int>(9, 1));
	for (auto i = 1; i <= 8; i += 2) {
		for (auto j = 2; j <= 8; j += 2) {
			--sum[i][j];
		}
	}
	for (auto i = 1; i <= 8; ++i) {
		for (auto j = 1; j <= 8; ++j) {
			sum[i][j] += sum[i - 1][j] + sum[i][j - 1] - sum[i - 1][j - 1];
		}
	}
	std::cin.tie(nullptr); std::cin.sync_with_stdio(false);
	int q; std::cin >> q;
	for (auto i = 0; i < q; ++i) {
		int a, b, c, d; std::cin >> a >> b >> c >> d;
		std::cout << sum[c][d] + sum[a - 1][b - 1] - sum[a - 1][d] - sum[c][b - 1] << '\n';
	}
}
accuracy: 1
time_ms: 10
memory_kb: 3472
final_rank: 6

code_snippet: // #.#.#.#.
// ########
// #.#.#.#.
// ########
// #.#.#.#.
// ########
// #.#.#.#.
// ########
#include <bits/stdc++.h>

using namespace std;

int main(){
    vector<string> mp;
    for(int i=0;i<4;i++){
        mp.push_back("#.#.#.#.");
        mp.push_back("########");
    }
    int N;
    cin >> N;
    for(int i=0;i<N;i++){
        int a,b,c,d;
        cin >> a >> b >> c >> d;
        a--,b--,c--,d--;
        int res = 0;
        for(int j=0;j<8;j++){
            for (int k = 0;k<8;k++){
                if(j>=a&&j<=c&&k>=b&&k<=d)
                    res += (mp[j][k]=='#');
            }
        }
        cout << res << endl;
    }
}
accuracy: 1
time_ms: 130
memory_kb: 3212
final_rank: 16

code_snippet: #include <iostream>
#include <cstring>
#include <cstdio>
using namespace std;
int main() {
    int q, a, b, c, d;
    scanf("%d", &q);
    for(int i = 1; i <= q; i++) {
        int ans = 0;
        scanf("%d %d %d %d", &a, &b, &c, &d);
        for(int i = a; i <= c; i++)
            for(int j = b; j <= d; j++)
                if(i % 2 == 1 && j % 2 == 0)
                    continue;
                else
                    ans++;
        cout << ans << endl;
    }
    return 0;
}
accuracy: 1
time_ms: 100
memory_kb: 3244
final_rank: 14

code_snippet: #include<iostream>
using namespace std;
int main(){
    int q; cin>>q;
    for(int i=0;i<q;++i){
	int a,b,c,d; cin>>a>>b>>c>>d;
        int cnt=0;
	for(int j=a;j<=c;++j)
	    for(int k=b;k<=d;++k)
		if(j%2==0||k%2==1) ++cnt;
	cout<<cnt<<endl;
    }
    return 0;
}
accuracy: 1
time_ms: 130
memory_kb: 3120
final_rank: 11

code_snippet: #include <bits/stdc++.h>
using namespace std;

int main(){
    int Q;
    cin >> Q;
    while(Q--){
        int a, b, c, d;
        cin >> a >> b >> c >> d;
        int x = (c+1)/2 - a/2;
        int y = d/2 - (b-1)/2;
        cout << (c-a+1)*(d-b+1) - x*y << endl;
    }
}
accuracy: 1
time_ms: 120
memory_kb: 3112
final_rank: 7

code_snippet: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define fi first
#define se second
#define dbg(x) cout<<#x" = "<<((x))<<endl
template<class T,class U> ostream& operator<<(ostream& o, const pair<T,U> &p){o<<"("<<p.fi<<","<<p.se<<")";return o;}
template<class T> ostream& operator<<(ostream& o, const vector<T> &v){o<<"[";for(T t:v){o<<t<<",";}o<<"]";return o;}

using vi = vector<int>;
using vvi = vector<vi>;

const int N = 8;

bool IN(int y, int x){
    return 0<=y && y<N && 0<=x && x<N;
}

void dfs(const vvi &f, int t){
    bool end = true;
    rep(i,N)rep(j,N)if(f[i][j]==-1){
        bool ok = false;
        vvi nf(f);
        nf[i][j] = t;
        for(int dy=-1; dy<=1; ++dy)for(int dx=-1; dx<=1; ++dx){
            if(dy==0 && dx==0) continue;

            int cy = i+dy, cx = j+dx;
            if(IN(cy,cx) && nf[cy][cx]==!t){
                while(IN(cy,cx) && nf[cy][cx]==!t){
                    cy += dy;
                    cx += dx;
                }

                if(IN(cy,cx) && nf[cy][cx]==t){
                    cy = i+dy;
                    cx = j+dx;
                    while(IN(cy,cx) && nf[cy][cx]==!t){
                        nf[cy][cx] = t;
                        cy += dy;
                        cx += dx;
                    }
                    ok = true;
                }
            }
        }
        if(ok){
            end = false;
            dfs(nf,!t);
        }
    }

    if(end){
        printf("---------------------\n");
        rep(i,N){
            rep(j,N){
                char c = f[i][j]+'0';
                if(f[i][j]==-1) c = '.';
                printf("%c", c);
            }
            printf("\n");
        }
    }
}

void test(){
    vvi s(N);
    rep(i,N) s[i] = vi(N,-1);
    s[3][3] = 0;
    s[3][4] = 1;
    s[4][4] = 0;

    dfs(s,1);
    dbg("END");
}

int f[N][N]={};
int dp[N][N][N][N];
int solve(int ly, int lx, int ry, int rx){
    if(dp[ly][lx][ry][rx]>=0) return dp[ly][lx][ry][rx];

    int a = 0;
    for(int i=ly; i<=ry; ++i)for(int j=lx; j<=rx; ++j) a += f[i][j];

    return dp[ly][lx][ry][rx] = a;
}

int main(){
    // test();

    rep(i,N)rep(j,N){
        if(i%2==0 && j%2==1) f[i][j] = 0;
        else f[i][j] = 1;
    }

    memset(dp, -1, sizeof(dp));
    int q;
    scanf(" %d", &q);
    while(q--){
        int a,b,c,d;
        scanf(" %d %d %d %d", &a, &b, &c, &d);
        printf("%d\n", solve(a-1, b-1, c-1, d-1));
    }
    return 0;
}
accuracy: 1
time_ms: 20
memory_kb: 3244
final_rank: 3

code_snippet: #include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define HUGE_NUM 99999999999999999
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;


int main(){

	int Q;
	scanf("%d",&Q);

	int a,b,c,d;
	int minus;

	for(int loop = 0; loop < Q; loop++){

		scanf("%d %d %d %d",&a,&b,&c,&d);

		minus = 0;

		for(int row = a; row <= c; row++){
			for(int col = b; col <= d; col++){
				if(row%2 == 1 && col%2 == 0)minus++;
			}
		}

		printf("%d\n",(c-a+1)*(d-b+1)-minus);
	}

	return 0;
}
accuracy: 1
time_ms: 20
memory_kb: 3216
final_rank: 1

code_snippet: #include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#include<map>
#include<stack>
#include<cmath>
#include<iomanip>
#include<set>
#include<numeric>
#include<sstream>
#include<random>
#include<cassert>
#include<complex>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rrep(i, st, n) for (int i = st; i < n; ++i)
using pii = pair<int, int>;
const int inf = 1e9 + 7;
int dy[] = {0, 0, -1, 1, -1, 1, -1, 1};
int dx[] = {1, -1, 0, 0, -1, 1, 1, -1};
#define ceil(a, b) a / b + !!(a % b)
#define chmax(a, b) a = max(a, b)
#define chmin(a, b) a = min(a, b)

int main() {
    cin.tie(0); ios::sync_with_stdio(false);
    int table[8][8] = {0};
    rep(i, 8) rep(j, 8) {
        if (i % 2 == 0 && j % 2 != 0) {
            table[i][j] = 1;
        }
    }
    //rep(i, 8) {rep(j, 8) cout << table[i][j] << " "; cout << endl;}
    //幅探で実験すればよかった
    //一手一手実験するのは愚策
    //途中間違えたら終わり
    int n; cin >> n;
    rep(i, n) {
        int ly, lx, ry, rx; cin >> ly >> lx >> ry >> rx;
        ly--; lx--; ry--; rx--;
        int c = 0;
        rrep(i, ly, ry + 1) rrep(j, lx, rx + 1) {
            if (table[i][j] == 0) c++;
        }
        cout << c << endl;
    }
    
    
}
accuracy: 1
time_ms: 100
memory_kb: 3224
final_rank: 12

code_snippet: #include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cctype>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define LINF (ll)INF*INF
#define MOD 1000000007
#define rep(i,n) for(int i=0;i<(n);i++)
#define loop(i,a,n) for(int i=a;i<(n);i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)

#define int ll //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,int> pii;
typedef vector<pii> vp;

int gcd(int a, int b){
    if(b==0) return a;
    return gcd(b,a%b);
}
int lcm(int a, int b){
    return a/gcd(a,b)*b;
}


signed main(void) {
    int v[8][8] = {};
    rep(i,8)rep(j,8){
        if(i%2 || j%2 == 0)v[i][j]++;
    }
    int n;
    cin >> n;
    while(n--){
        int a,b,c,d;
        scanf("%lld %lld %lld %lld",&a,&b,&c,&d);
        int ans = 0;
        a--,b--;
        loop(i,a,c)loop(j,b,d)ans += v[i][j];
        printf("%lld\n",ans);
    }

}
accuracy: 1
time_ms: 20
memory_kb: 3224
final_rank: 2

code_snippet: #include<bits/stdc++.h>
using namespace std;
using Int = long long;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}

//INSERT ABOVE HERE
signed main(){
  int q;
  cin>>q;
  int s[8][8]={{1,0,1,0,1,0,1,0},
               {1,1,1,1,1,1,1,1},
               {1,0,1,0,1,0,1,0},
               {1,1,1,1,1,1,1,1},
               {1,0,1,0,1,0,1,0},
               {1,1,1,1,1,1,1,1},
               {1,0,1,0,1,0,1,0},
               {1,1,1,1,1,1,1,1},};
  while(q--){
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    a--;b--;
    int res=0;
    for(int i=a;i<c;i++)
      for(int j=b;j<d;j++)
        res+=s[i][j];
    cout<<res<<endl;
  }  
  return 0;
}
accuracy: 1
time_ms: 130
memory_kb: 3108
final_rank: 8

code_snippet: #include <bits/stdc++.h>
#define chmin(a, b) ((a)=min((a), (b)))
#define chmax(a, b) ((a)=max((a), (b)))
#define fs first
#define sc second
#define eb emplace_back
using namespace std;

typedef long long ll;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;

const ll MOD=1e9+7;
const ll INF=1e18;
const double pi=acos(-1);
const double eps=1e-10;

int dx[]={1, -1, 0, 0};
int dy[]={0, 0, 1, -1};

int main(){
    vector<vector<int>> pat(8, vector<int>(8, 1));
    for(int i=0; i<8; i+=2){
        for(int j=1; j<8; j+=2){
            pat[i][j]=0;
        }
    }

    int q; cin>>q;
    while(q--){
        int a, b, c, d; cin>>a>>b>>c>>d;
        a--, b--, c--, d--;
        int ans=0;
        for(int i=a; i<=c; i++){
            for(int j=b; j<=d; j++){
                ans+=pat[i][j];
            }
        }
        cout << ans << endl;
    }
}
accuracy: 1
time_ms: 130
memory_kb: 3176
final_rank: 15

code_snippet: // #define _GLIBCXX_DEBUG // for STL debug (optional)
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <fstream>
#include <functional>
#include <bitset>
using namespace std;

#define debug(...) fprintf(stderr, __VA_ARGS__)
#define int long long int
 
template<typename T> void chmax(T &a, T b) {a = max(a, b);}
template<typename T> void chmin(T &a, T b) {a = min(a, b);}
template<typename T> void chadd(T &a, T b) {a = a + b;}
 
typedef pair<int, int> pii;
typedef long long ll;
 
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
const ll INF = 1001001001001001LL;
const ll MOD = 1000000007LL;
 
signed main() {
    int Q; cin >> Q;
    while(Q--) {
        int lx, ly, rx, ry;
        cin >> lx >> ly >> rx >> ry;
        lx--; ly--;

        int ans = (rx - lx) * (ry - ly);
        for(int x=lx; x<rx; x++) {
            for(int y=ly; y<ry; y++) {
                if(x % 2 == 0 and y % 2 == 1) ans--;
            }
        }
        cout << ans << endl;
    }
    return 0;
}
accuracy: 1
time_ms: 130
memory_kb: 3108
final_rank: 8

code_snippet: #include "bits/stdc++.h"
using namespace std;
#define int long long
#define endl '\n'
int mod=1e9+7;
int mod2=998244353;
const int INF=1e9;

signed main(){
  //cin.tie(0);
  //ios::sync_with_stdio(false);
  int q;
  cin>>q;
  for(int i=0;i<q;i++){
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    int ans=0;
    for(int j=a;j<=c;j++){
      for(int k=b;k<=d;k++){
        if(j%2==0||k%2==1)ans++;
      }
    }
    cout<<ans<<endl;
  }
}

// `.`..`(WNNNNNNMNWWWH9rttwgHM8OtttwwVtttrrtrttrw0rtrtwrrrtrZUAOOrrrXWppHMHyZHpWHMHMkWWVHMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
// `.`.`..`(WMNMHfWH9ZtrtAdNM8ttttOwVtrrtrrtrrrrrdrrttrZkOrrrrrrXWyrtrrZWWWWMmwXWppWHHMmWHkWMMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
// .`.```_..(HMfWH9OtttwXWHBrttrOw0rttrOvrrrtrZrrRrtrrrtZHwrrrrrwwZHyrrrrZWWpWMmwWppkWHHMkHNkVW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ttttdNXr.`.J>~-((J+ggQkHXHHHmaJz7&JWHMMWkuHXzuuuzzWgHHwHkKuzXMKXuzuuzuzzuzdkHHHHHkHWMHHbkWHMMMNXM#
// Wg#rvrvrrXmHNpfHHHMMRd-.._4kfyttttllOHWr`` <udT"""7"""""TMHHMNHHMNgv4HMRXHXHwuzzzuWHHKXHkHzzXMSWzuzzuzuuzudbkHHHHkkHqHuWkWHHMMMNWM
// WHNrvrvvvXHmNppgg@MMMHr..` UkWOlllllldW$..?!     `     ` ?@MMHHMM#NMMmMkXXWkHuzuzuWNHSXHHHuuXNSWuzuuzuzuzuWkHNgMkkkMHSuWkqmqHHMNNK
// WHMkvvrvrXHHMppHHHMNMTN_``` 4kWOz====vXP` `   `        ``.HggmgM@MH###NKkkuXWHzzuXHHMzdMHHuzWNXKzuuzuzuzuuHkHHNMkkHHBuzWkHHHHuHMMM
// WHHNzvvrvwHMMppHMMMM>.#L`````?kyy====?0S``  `     ` ``...dmqqqmmHHHMMM#WRSzuzWHuzXHq#uWHHHzuWHXKzuzzuzuzuXHkHWMNkWM#uzuWHHHHSuuWM#
// WM@MkwvvrzXMMHpgHMMM[.MN.`````(HXy1???zd.``  `  `   ` dHkkqkkqkHHHHHHMMWWXzzuzwWwXHHKXMkHHuXMRXSuuuzuuzuzXHkHdHHWHHXuuwWHqHHuXzXWM
// XHHMNyrvvwdW@HpHWMHML MM[`  ` `.4kGz<<>Or```  `      `dWpbbbbbHMMbbbHHMXXuzzuzuzXWHHSXMkHHuXMSXuzzuzzuzuzWkkHWMHMSwuzzXHkHHXuzuWd#
// dHHH@NyzwwwWHMHHWMMMR dW]`` ` ```(HZx<<<4.```` `` ``  OZppfppppWfpWpK9NKXuuzuuzuXWHHudMqNHXWNuHuzzuzuzuzuHkHXMMBuuuzuuWkHHUuuuXSMS
// wWHMMMMkwwvdNpHHHM#MH-jWP``` `` ```7kI<:<h.``````` `` ,2OWVVyVVyWWWWIdMKWzuuuzzuXHHSwHHHHKXHHXSuuzuuzuzuXHHHXMXuuuuuuXHHHuzuuXSX#X
// wdWHMMMMmwXwHbpMNHMM@b.hb``````````` 7x1_(>_```````````(x7UUUV0XwvCI1dMWKXuzzuzuWHHudMkgkWbMSXuzzzuzzuzuWkHSW#zXwXuXXWHHuuXXuWXWSX
// vvXWHMMHWNkvWHbbMWMMMN_JF.```` `` `````?1_(_.`.`........(<777=<<<><<+dMXUuzuuuuWWMRwMHWMkWHHXSuuzuzuzzuXqHHXMHUXuXXHHHSuuwuXWud8uH
// mzzXWH#zHbHkXNbbWMMMMD~(_``````````````` .~_`.``.`.`.....___(<~(<<(<<dHkkuuuuuXkHHuWMkHkkkHSXXzuuzuuuuzXHHSd#uuXXWHHXuuuZuXSuqHudS
// UHzzXWSXXWbbHHHbWHMH#<~...```` ``````````````.```.` -_____<~~_<_<~~(jMWSuzuzuXWHMHXMHHHkkH#XSuzzuzuzuzuKkHXMQkWHHWUXuXXUuXUuXHuXBu
// .(Smd8wSvXbbbbHHHWHW3___.``````` `` ``````.```.```.`...._.._~~..~_~~(#WuzuuzXXkHMqMMHMkkkMUXuXzuuwuuzuXkHSWMWUUuuuXXUUuXHXXWSuXHXu
// .. JKwSvwzWkkkkHHHH5~~..```````````````````.```.````````.` .........dWSuuzzzdkHMW@MHMkkkHHXXuzuuXSuzuuWWHd#uuuXXkWSuXXWUXXHUXWHuuu
// .`(HXSzzzzwWbkWHNHr_...``````````````````.```````.```````.`.`..`.-.(HKuzzuuwHHMNMHHMkkkHHuZuuzuuXuuuuXkHWMHHHUUuXXXWHXXHHUuXW8uuuu
// .-MXWwzzzuzXkHHMHHN-.`````````` ````````````.`.````.``.```.`.`....-dXUXuzuXHWHMMHHBWHMMMSZuzuuzXXzuuXHHMHMHkHHHHHHHWHHSuXkHWSuuuuX
// (#XKzzzzzuzuWHHkWHHp ``.````````````````````````.````````.....-((-(NSXuzzXHW@D:~`(/1- .kXuzuuzXSuuzXXkHWMHHHHHHHHMWuuuQXUXWuuuXuXH
// MXWzuzzzzzuXHHbHNMMMt`.```````````````````````````.`.` ..-J7"!``  XKuzzuXHHM9;/<-.J-u!JXXuuzuXWuuuuXHHH#WMNHmkkkuXXkWUXXWXXuuuXqHH
// XWzzzzuzzwXHHHH#"````<.````````````````````.``.`...-c"7``` ` `  `(BzuuuXmHH8<!(- ?_!`jWUuzuuuWuuuzXWHNH> ..7WHHqHmQkWWXXuuuuuXWqHH
// SwuzzzXuwXHNHY``  ``  <,`.`````````````` `` ..J7=``` ` ` `` ````.#zuzXXHHH$~`` ```(_(HSuuuzuXSuzuuXHHWCi(` ._ ?WggHHHHWkkkkWHHHHMH
// zzzuzuzwWHMY!`  `   ` `(&.```````````` ..J7^ `` `  `  `   ` `. .HXuuXWHW#!` ` ```` (WUuzzuXXSzuuudHHXY$. : (..``.THHkqkHHHgHHMHkkk
// zzzzzzXHWK``  ` `` ` ` ` TJ.``````..J7=````    ` `  ` ` `` ` `.8zuXXHHW=`   ``  ..(XSuuuuuXWuuuuXHWH5~~` .`_?_,-``.TMMMMMMHkkqqHHH
// zzuuzdHHkN ` ` `  ``  ` ``(Wm,.(J7!```  `  ``` `` `` ` ` ``` .SzuXWHHY `` .._~<~~(dSuuuzzXHuuuuXHWHD::?C._.( -`(!_1 ,WHqHHHmqHHHHN
// zuzXXHHkHM;`  ` ` ` ``  ` .;jY= ` .``_``  `  `  `  ` `` ` `.dXuXWm@^ .._~_.~~~~~(d0uuzuuXHUuuuXHWH5:::::::_.<&._4r?_.;WMMM@MMY"<!`
// zzXHHHHMHMb`` `` ` `` `` .J!  ` ..`_~  ` ` ` `` `   `  ``.JXXXHY! .__.....~.~~~-d0wuzuXXHSuuuXWWH$::::;:::;:+- ~`(.i +HqHHkkHL..`.
// XWHHHMMHMHM; `  ` `   ` ._`` ...(:.=_` `  ` `  ` ```` .-dVT7^``````......~~~~~_jWuuuuuXHSuzuXHHH3<;:::::;;j<+z ``` -dHNkkMqkkN..``
// HHHMMHHHHNMN.``  ` `  `!`z(. ~..~ ! . ` ``  ` ` ` ..gHr``````````........~~~~_jWuuuuuXkSuuuXHWHC:;::;;:::+v>:((J<!(WHHMkkHNqkM;`..
// HMMkkHHHHM9?b ``  ` `  ``     .``. `  ` ` `  ``` 4HkkkH,  ``````.`......~~~~_+KuuuzuXHSuuuXHHK<(::::::<;<J+g9>::;<  .4NkkqMHqH]..`
// MHkHHHMM$<<:?L` `` ` `  ` ``.` `  !``  ` ` ` `  ` ?HbkkHx``````.`..`...~~~~_jKuuuuuXHSuuuqMHD<:<;:<++ddNMB3:;::;:<` `,HkkqH@HH].``
// kkHHkHY``` (;?h`` ` ` ``  ````  ` ` ` ` ` ` ` ` ```.4XWbHx```..`......~~~~_gKuuuuXWH0uuuXHH3:;++1z<jgMB3<::::::::~` `jMkqkHMHHF.`.
// kHHHH=` . ` _<?L  ` `  ` `    `  ` ` ` ` ` ` `  ` `  ?kwWHp .`.......~_~~(dKuuuuXWHUuuXWH9++z1<;+jWB3::::;;;::;:;_`` MNkqkqMNMF..`
// HHk@!.  ` ` ` ~?L  ` ` `` ` `` `` ` ` ` `  ` ` `   `  -WuXHh..`.....~~~~(dWuuuXXkHUuuXHH9>:<:++YY<:;::::;:::::;:::+.``?HHkHHHM>`.`
accuracy: 1
time_ms: 130
memory_kb: 3108
final_rank: 8