2013
12-29

# Count the cuboids

Look up the picture A , the big wood is cut into many small ones. As we know, a cuboid has three attributes: Length, Width and Height. In the picture B, C, D, there are different. The problem is so easy that you just need to count the kinds of the cuboids which can be cut from the big one. When we cut the big one into so many small one, we give every one a number to mark which is 1×1×1. Look at the picture B and C, they have the same length, width and height, but the marking numbers they have are different from each other, so B is different from C. B and D have the different attributes (any one attribute of the length, width and height is different), so they are also different.

Many data cases come. In each case, there are three positive integers L, W, H, which are the length, the width and the height of the LWH. When L, W and H are all -1, the input is over, and you haven’t to handle them.

Many data cases come. In each case, there are three positive integers L, W, H, which are the length, the width and the height of the LWH. When L, W and H are all -1, the input is over, and you haven’t to handle them.

5 3 4
2 2 2
1 1 2
-1 -1 -1

900
27
3

#include <stdio.h>
int main ()
{
__int64 a,b,c,n;
while (scanf("%I64d %I64d %I64d",&a,&b,&c)!=EOF)
{
if (a==-1 && b==-1 && c==-1) return 0;
n=a*(a+1)*b*(b+1)*c*(c+1)/8;
printf ("%I64d\n",n);
}
return 0;
}

#include <stdio.h>
int main ()
{
int a,b,c,n;
while (scanf("%d %d %d",&a,&b,&c)!=EOF)
{
if (a==-1 && b==-1 && c==-1) return 0;
n=0.125*a*(a+1)*b*(b+1)*c*(c+1);
printf ("%d\n",n);
}
return 0;
}

1. 因为是要把从字符串s的start位到当前位在hash中重置，修改提交后能accept，但是不修改居然也能accept

2. [email protected]

3. 这个方法是错的，不信你试试：
20 5
1 A:9
1 A:9
1 A:9
1 A:6
1 A:4
正确答案应该是19，这个答案是18