| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 734 人关注过本帖
标题:不懂题目什么意思,请教高手
取消只看楼主 加入收藏
hugh2006
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2008-7-12
收藏
 问题点数:0 回复次数:1 
不懂题目什么意思,请教高手
Problem A. Matrix
Description:

    Given an n*n matrix A, whose entries Ai,j are integer numbers ( 0 <= i < n, 0 <= j < n ). An operation SHIFT at row i ( 0 <= i < n ) will move the integers in the row one position right, and the rightmost integer will wrap around to the leftmost column.

 

    You can do the SHIFT operation at arbitrary row, and as many times as you like. Your task is to minimize

max0<=j< n{ Cj | Cj=Σ0<=i<n Ai,j }   

Input:

    The input consists of several test cases. The first line of each test case contains an integer n. Each of the following n lines contains n integers, indicating the matrix A. The input is terminated by a single line with an integer −1. You may assume that 1 <= n <= 7 and |Ai,j| < 104.

Output:

    For each test case, print a line containing the minimum value of the maximum of column sums.

Sample Input:

2
4 6
3 7
3
1 2 3
4 5 6
7 8 9
-1
Sample Output:

11
15
搜索更多相关主题的帖子: operation position numbers around matrix 
2008-07-13 18:22
hugh2006
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2008-7-12
收藏
得分:0 
知道了,谢谢
2008-07-14 00:34
快速回复:不懂题目什么意思,请教高手
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.025525 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved