bryce1010模板
http://codeforces.com/gym/101810

#include <bits/stdc++.h>

using namespace std;
#define ll long  long



int main()
{
    int t;
    scanf("%d",&t);
    ll n,m;
    while(t--)
    {
        scanf("%lld%lld",&n,&m);
        ll cnt=0;
        if(m>n)swap(m,n);
        for(ll i=0;i<m;i++)
        {
            cnt+=(n-i)/2;
            cnt+=(n-i)%2;
            cnt+=(m-i-1)/2;
            cnt+=(m-i-1)%2;
        }
        printf("%lld\n",cnt);
    }
    return 0;
}

相关文章:

  • 2021-07-16
  • 2021-08-13
  • 2021-12-07
  • 2022-01-03
  • 2021-05-22
  • 2021-09-17
  • 2021-11-24
猜你喜欢
  • 2021-11-11
  • 2021-09-12
  • 2021-08-30
  • 2021-11-25
  • 2021-06-04
  • 2021-12-21
  • 2022-12-23
相关资源
相似解决方案