- 博客(4)
- 资源 (1)
- 收藏
- 关注
原创 sjtu 1008 二哥买期货
http://acm.sjtu.edu.cn/OnlineJudge/problems C++程序编写 解决这道命题需要一些基础知识,比如知道日期的情况下计算该日期是星期几,还有平闰年的计算,程序代码如下:#include #include using namespace std; const int dayofmonth[2][13] = { { 0, 31, 28, 31, 30,
2015-03-10 16:00:52 879
原创 sjtu 1006 求和游戏
http://acm.sjtu.edu.cn/OnlineJudge/problem/1006 C++程序编写 该命题可以看做是求数组的最大子数组问题,且最大子数组中元素最小个数人为2(即最大子数组元素的个数不能为1): #include using namespace std; int main() { int n; cin >> n; int *pi = new i
2015-03-09 14:49:51 502
原创 sjtu 1005 数独
http://acm.sjtu.edu.cn/OnlineJudge/problem/1005 C++程序编写 #include #include using namespace std; bool isunique(int a[]) { bool flag = true; sort(a, a + 9); for (int i = 0; i < 9; i++) if (a[i]
2015-03-09 09:32:55 688
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人