文件名称:mian
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:170.12kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
幻方矩阵
问题描述:
幻方是一种很有意思的数字矩阵,在很早著名的九宫八卦阵就与幻方有关。
幻方的定义为:
1 到 N*N 的整数填入N*N的方格中,每行和每列以及对角线的数字之和必须是相等的。
你作为八卦公司的顶级程序员,现在需要你解决一个问题,将任意奇数阶的幻方找出来。
输入:
输入包括多个测试集,每行为一个正奇数N(1 <= N < 1000),0作为输入的结束且不需要处理。
输出:
对于输入的每一个N, 输出一个它所对应的N阶幻方,如果存在多个,任意一个即可。
每个幻方为N*N的矩阵,
对于每个幻方,每行输出幻方的一行,每行中的数字之间用一个或多个空格分开。不同的幻方之间用一个空行分开。-Magic square matrices
Problem Descr iption:
The Magic Quadrant is a very interesting digital matrix, Bagua Zhen Jiu Gong in early on with the famous magic square related.
Magic square is defined as:
1 to N* N N* N integer fill the grid, each row and column and diagonal sum of the numbers must be equal.
Your company s top programmers as gossip, you now need to solve a problem, any odd-order magic square to find out.
Input:
Input consists of multiple test sets, each act a positive odd N (1 <= N <1000), 0 end as input and does not require treatment.
Output:
For each input N, it corresponds to the output of a magic square of order N, if there is more than one, any one can.
Every magic square is N* N matrix,
For each magic square, magic square of each line of output line between the numbers in each row with one or more separated by spaces. Between the different magic squares separated by a blank line.
问题描述:
幻方是一种很有意思的数字矩阵,在很早著名的九宫八卦阵就与幻方有关。
幻方的定义为:
1 到 N*N 的整数填入N*N的方格中,每行和每列以及对角线的数字之和必须是相等的。
你作为八卦公司的顶级程序员,现在需要你解决一个问题,将任意奇数阶的幻方找出来。
输入:
输入包括多个测试集,每行为一个正奇数N(1 <= N < 1000),0作为输入的结束且不需要处理。
输出:
对于输入的每一个N, 输出一个它所对应的N阶幻方,如果存在多个,任意一个即可。
每个幻方为N*N的矩阵,
对于每个幻方,每行输出幻方的一行,每行中的数字之间用一个或多个空格分开。不同的幻方之间用一个空行分开。-Magic square matrices
Problem Descr iption:
The Magic Quadrant is a very interesting digital matrix, Bagua Zhen Jiu Gong in early on with the famous magic square related.
Magic square is defined as:
1 to N* N N* N integer fill the grid, each row and column and diagonal sum of the numbers must be equal.
Your company s top programmers as gossip, you now need to solve a problem, any odd-order magic square to find out.
Input:
Input consists of multiple test sets, each act a positive odd N (1 <= N <1000), 0 end as input and does not require treatment.
Output:
For each input N, it corresponds to the output of a magic square of order N, if there is more than one, any one can.
Every magic square is N* N matrix,
For each magic square, magic square of each line of output line between the numbers in each row with one or more separated by spaces. Between the different magic squares separated by a blank line.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
mian/Debug/mian.exe
mian/Debug/mian.ilk
mian/Debug/mian.obj
mian/Debug/mian.pch
mian/Debug/mian.pdb
mian/Debug/vc60.idb
mian/Debug/vc60.pdb
mian/mian.cpp
mian/mian.dsp
mian/mian.dsw
mian/mian.ncb
mian/mian.opt
mian/mian.plg
mian/Debug
mian
mian/Debug/mian.ilk
mian/Debug/mian.obj
mian/Debug/mian.pch
mian/Debug/mian.pdb
mian/Debug/vc60.idb
mian/Debug/vc60.pdb
mian/mian.cpp
mian/mian.dsp
mian/mian.dsw
mian/mian.ncb
mian/mian.opt
mian/mian.plg
mian/Debug
mian
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.