cf 559a **

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

 

 1 #include<cstdio>
 2 #include<iostream>
 3 #include<algorithm>
 4 #include<cstring>
 5 #include<cmath>
 6 #include<queue>
 7 #include<map>
 8 using namespace std;
 9 #define MOD 1000000007
10 const int INF=0x3f3f3f3f;
11 const double eps=1e-5;
12 typedef long long ll;
13 #define cl(a) memset(a,0,sizeof(a))
14 #define ts printf("*****\n");
15 const int MAXN=1005;
16 int n,m,tt;
17 int a[MAXN];
18 int main()
19 {
20     int i,j,k;
21     #ifndef ONLINE_JUDGE
22     freopen("1.in","r",stdin);
23     #endif
24     int a1,a2,a3,a4,a5,a6;
25     while(~scanf("%d%d%d%d%d%d",&a1,&a2,&a3,&a4,&a5,&a6))
26     {
27         printf("%d\n",(a1+a2+a3)*(a1+a2+a3)-a5*a5-a3*a3-a1*a1);
28     }
29 }

 

你可能感兴趣的:(c)