2014
02-12

# Cry，men，not crime

Cry，men，not crime——When I was a child ever, people around me told me not to tear. When I am a man now, I said to the mirror not to regret anything.

See the figure below，please calculate how many paths are there on a grid where each step of the path consists of moving one unit to the right or one unit up, which from left-down to right-up.

It is a simple problem, isn’t it ?
If you can’t solve it, please cry, although you are a man, nobody will laugh at you, it is not crime !

The input contains several test cases. Each is specified by two integers n and m, denoting the size of the rectangle. As you can observe, the number of lines of the corresponding grid is one more in each dimension. Input is terminated by n=m=0.

The input contains several test cases. Each is specified by two integers n and m, denoting the size of the rectangle. As you can observe, the number of lines of the corresponding grid is one more in each dimension. Input is terminated by n=m=0.

5 4
1 1
0 0

126
2

#include <stdio.h>
__int64 f(__int64 n,__int64 m){
__int64 s=1;
__int64 i;
for(i=1;i<=m;i++)
s=s*(n+i)/i;
return s;
}
int main(){
__int64 n,m;
while(scanf(“%I64d %I64d”,&n,&m)!=EOF&&(n||m)){
if(n<m){n=n^m;m=n^m;n=n^m;}
printf(“%I64d\n”,f(n,m));}
return 0;
}

1. “再把所有不和该节点相邻的节点着相同的颜色”，程序中没有进行不和该节点相邻的其他节点是否相邻进行判断。再说求出来的也不一样是颜色数最少的

2. Thanks for taking the time to examine this, I really feel strongly about it and love studying a lot more on this topic. If possible, as you acquire experience