简单题 ~~

#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std; int a[110][110], _max;
void cood(int n)
{
int sum = 0;
for(int i = 1; i <= n; i ++)
{
for(int j = 1; j < i; j ++)
sum -= a[j][i];
for(int j = i+1; j <= n; j ++)
{
sum += a[i][j];
}
_max = max(_max, sum);
}
}
void res(int n)
{
for(int i = 1; i <= n; i ++)
for(int j = i+1; j <= n; j ++)
{
int tem = a[i][j];
a[i][j] = a[j][i];
a[j][i] = tem;
}
}
int main()
{
int n;
scanf("%d", &n);
_max = 0;
for(int i = 1; i <= n; i ++)
for(int j = 1; j <= n; j ++)
scanf("%d",&a[i][j]);
cood(n);
res(n);
cood(n);
printf("%d\n", _max%36 == 0 ? _max/36:_max/36+1);
return 0;
}

ural 1869的更多相关文章

  1. 1869: Mathematics and Geometry

    这是郑州轻工业学校的一次校赛的校内选拔赛,看名字是计算几何 的题 题目地址: http://acm.zzuli.edu.cn/zzuliacm/problem.php?id=1869 Descript ...

  2. 后缀数组 POJ 3974 Palindrome && URAL 1297 Palindrome

    题目链接 题意:求给定的字符串的最长回文子串 分析:做法是构造一个新的字符串是原字符串+反转后的原字符串(这样方便求两边回文的后缀的最长前缀),即newS = S + '$' + revS,枚举回文串 ...

  3. ural 2071. Juice Cocktails

    2071. Juice Cocktails Time limit: 1.0 secondMemory limit: 64 MB Once n Denchiks come to the bar and ...

  4. ural 2073. Log Files

    2073. Log Files Time limit: 1.0 secondMemory limit: 64 MB Nikolay has decided to become the best pro ...

  5. ural 2070. Interesting Numbers

    2070. Interesting Numbers Time limit: 2.0 secondMemory limit: 64 MB Nikolay and Asya investigate int ...

  6. ural 2069. Hard Rock

    2069. Hard Rock Time limit: 1.0 secondMemory limit: 64 MB Ilya is a frontman of the most famous rock ...

  7. ural 2068. Game of Nuts

    2068. Game of Nuts Time limit: 1.0 secondMemory limit: 64 MB The war for Westeros is still in proces ...

  8. ural 2067. Friends and Berries

    2067. Friends and Berries Time limit: 2.0 secondMemory limit: 64 MB There is a group of n children. ...

  9. ural 2066. Simple Expression

    2066. Simple Expression Time limit: 1.0 secondMemory limit: 64 MB You probably know that Alex is a v ...

随机推荐

  1. MiZ702学习笔记12——封装一个普通的VGA IP

    还记得<MiZ702学习笔记(番外篇)--纯PL VGA驱动>这篇文章中,用verilog写了一个VGA驱动.我们今天要介绍的就是将这个工程打包成一个普通的IP,目的是为后面的一篇文章做个 ...

  2. Redhat/Centos6.x-Samba配置

    安装: yum -y install samba samba-common samba-client 设置samba帐号 useradd smb passwd smb smbpasswd -a smb ...

  3. Java RMI 远程方法调用

    Java RMI 指的是远程方法调用 (Remote Method Invocation).它是一种机制,能够让在某个 Java 虚拟机上的对象调用另一个 Java 虚拟机中的对象上的方法.可以用此方 ...

  4. 在 linux x86-64 模式下分析内存映射流程

    前言 在上一篇中我们分析了 linux 在 x86-32 模式下的虚拟内存映射流程,本章主要继续分析 linux 在 x86-64 模式下的虚拟内存映射流程. 讨论的平台是 x86-64, 也可以称为 ...

  5. 【Qt】QSettings读写注册表、配置文件【转】

    简述 一般情况下,我们在开发软件过程中,都会缓存一些信息到本地,可以使用轻量级数据库sqlite,也可以操作注册表.读写配置文件. 关于QSettings的使用前面已经介绍过了,比较详细,见“更多参考 ...

  6. Turn.js 实现翻书效果的学习与总结

    最近CTO给我分配了一个移动端H5开发的任务,主要功能是需要实现翻书效果,我听过主要需求后,当时是呀!!!接下来自己尝试使用fullPage.js和Swiper来实现翻书效果,结果效果都不是非常的理想 ...

  7. Use a layout_width of 0dip instead of wrap_content for better performance.......【Written By KillerLegend】

    当你在一个Linearlayout布局中只为一个组件设置android:layout_weight属性时,那么这个组件将默认填充Linearlayout的剩余空间(宽度与高度方向),而不用事先进行测量 ...

  8. Microsoft Press Free eBook

    微软的免费的电子书, 都是Microsoft Press 出版的 有以下价格方面 Windows Server(大体上都是Windows Server 2012 ) Microsoft Azure(好 ...

  9. SSH时不需输入密码

      我这里有2台机器,一台装了Teradata数据库,ip是192.168.184.128,称它为teradata-pc:另一台装了Oracle数据库,ip地址是192.168.184.129,称它为 ...

  10. [CSS]学习总结

    1. 遮挡层 .occlusion { opacity: -.35;/*透明程度*/ -moz-opacity: -.35; filter: alpha(opacity=-35); height: 1 ...