POJ-1050 To the Max~~~~~~~~
来源:互联网 发布:数据日语怎么说 编辑:程序博客网 时间:2024/05/21 10:52
#include<iostream>using namespace std;int N;int arr[105][105];int main(){cin >> N;int tmp;int max = -20000;for (int j,i = 0; i < N; i++){tmp = 0;for (j = 0; j < N; j++){cin >> arr[i][j];if (tmp > 0) tmp += arr[i][j];else tmp = arr[i][j];if (tmp > max) max = tmp;}}for (int i = 0; i < N -1; i++){for (int j = i+1; j < N; j++){tmp = 0;for (int k = 0; k < N; k++){arr[i][k] += arr[j][k];if (tmp > 0) tmp += arr[i][k];else tmp = arr[i][k];if (tmp > max) max = tmp;}}}cout << max << endl;system("PAUSE");return 0;}
0 0
- POJ 1050 To the Max
- poj 1050 To the Max
- POJ 1050 To the Max
- poj 1050 To the Max
- Poj 1050 To the Max
- POJ 1050 To the Max
- POJ 1050 To the Max
- POJ 1050 To the Max
- poj 1050 To the Max
- poj 1050 To the Max
- Poj 1050 To the Max
- POJ 1050 To the Max
- poj 1050 to the max
- POJ 1050 To the Max
- poj 1050 to the max
- poj-1050- To the Max
- POJ-1050-To the Max
- POJ 1050 To the Max
- 236. Lowest Common Ancestor of a Binary Tree
- hdu 5698 求组合数(逆元+阶乘 递推公式
- hdu2222 Keywords Search
- 读取一个在0-99999之间的整数,将该整数的各位数字相加,如求和结果大于9,则继续对所获得的结果数字按各位相加求和,直至求出的和值小于10。
- 从C到C++奇妙之旅(二)--结构体和类
- POJ-1050 To the Max~~~~~~~~
- poj1204 Word Puzzles
- ubuntu16.04安装搜狗输入法
- 给定一个10位的整数组成的串,形式如: d1d2d3d4d5d6d7d8d9d10 。 其中最后的一位(即 )是校验和,其使用以下运算规则以前面的9位上的整数作为参数获得结果
- [Android 知识点] MVP+RxJava+Dagger开发框架
- poj4052 Hrinity
- 对输入的字符串进行反转并显示结果,例如输入字符串为hello,则程序应输出olleh。
- 解决AJAX动态加载元素无法绑定事件
- hdu3065 病毒侵袭持续中