網頁

Wednesday 16 June 2010

Grey Code

scanf("%d",&n);
for (int i=0;i<(1<<n);i++) printf("%d\n",i^(i>>1));


霸氣。

No comments:

Post a Comment