sjtu
xxx_1991
西安电子科技大学
展开
-
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 · 673 阅读 · 0 评论 -
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 · 498 阅读 · 0 评论 -
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 · 874 阅读 · 0 评论