2012年3月27日

摘要: Warning:GCC 4.2 and above support -march=native, which automatically detects the optimum settings to use based on your processor. -march=native also detects and applies additional settings beyond -march specific to your CPU, (eg. -msse4). Unless you have a specific reason not to (e.g. distcc cross-c 阅读全文
posted @ 2012-03-27 20:23 yming0221 阅读(612) 评论(0) 推荐(0)
摘要: 本算法中引用的是由Tomohiko Sakamoto 提供的简洁函数代码代码如下:int dayofweek(int y, int m, int d) /* 0 = Sunday */ { static int t[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4}; y -= m < 3; return (y + y/4 - y/100 + y/400 + t[m-1] + d) % 7; } AC代码如下:#include <stdio.h> int dayofweek(int y, int m, int d) /*... 阅读全文
posted @ 2012-03-27 19:41 yming0221 阅读(226) 评论(0) 推荐(0)

导航