| 记录编号 | 
        85546 | 
        评测结果 | 
        AAAAAAAAAA | 
    
    
        | 题目名称 | 
        1474.[UVa 11538] 象棋中的皇后 | 
        最终得分 | 
        100 | 
            
    
    
        | 用户昵称 | 
         cstdio | 
        是否通过 | 
        通过 | 
    
    
        | 代码语言 | 
        C++ | 
        运行时间 | 
        0.069 s  | 
    
    
        | 提交时间 | 
        2014-01-06 22:29:19 | 
        内存使用 | 
        0.25 MiB  | 
        
    
    
    
    		显示代码纯文本
		
		#include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<vector>
#include<queue>
#include<iomanip>
using namespace std;
typedef long long ll;
int main(){
	freopen("chessqueen.in","r",stdin);
	freopen("chessqueen.out","w",stdout);
	ll n,m,ans;
	scanf("%lld%lld",&n,&m);
	if(n>m) swap(n,m);
	ans=n*m*(m+n-2)+2*n*(n-1)*(3*m-n-1)/3;
	printf("%lld\n",ans);
	return 0;
}