cf 559a **

时间:2023-07-06 21:57:02

题意:给一个六边形,求小三角形个数

 #include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<queue>
#include<map>
using namespace std;
#define MOD 1000000007
const int INF=0x3f3f3f3f;
const double eps=1e-;
typedef long long ll;
#define cl(a) memset(a,0,sizeof(a))
#define ts printf("*****\n");
const int MAXN=;
int n,m,tt;
int a[MAXN];
int main()
{
int i,j,k;
#ifndef ONLINE_JUDGE
freopen("1.in","r",stdin);
#endif
int a1,a2,a3,a4,a5,a6;
while(~scanf("%d%d%d%d%d%d",&a1,&a2,&a3,&a4,&a5,&a6))
{
printf("%d\n",(a1+a2+a3)*(a1+a2+a3)-a5*a5-a3*a3-a1*a1);
}
}