#include<stdio.h>
int main()
{
int n,m,a[][],b[][];
while(scanf("%d%d",&n,&m)!=EOF)
{ for(int i=;i<n;i++)
{
for(int j=;j<m;j++)
{
scanf("%d",&a[i][j]);
}
} for(int i=;i<m;i++)
{
for(int j=;j<n;j++)
{
b[i][j]=a[j][i];
}
} for(int i=;i<m;i++)
{
for(int j=;j<n-;j++)
{
printf("%d ",b[i][j]);
}
printf("%d\n",b[i][n-]);
}
}
return ;
}

Problem C: 零起点学算法93——矩阵转置的更多相关文章

  1. Problem D: 零起点学算法95——弓型矩阵

    #include<stdio.h> #include<string.h> int main() { ][]; while(scanf("%d%d",& ...

  2. Problem D: 零起点学算法94——输出矩阵

    #include<stdio.h> int main() { ][]; while(scanf("%d %d",&n,&m)!=EOF) { ; ;i& ...

  3. 1186: 零起点学算法93——改革春风吹满地(C)

    一.题目 http://acm.wust.edu.cn/problem.php?id=1186&soj=0 二.分析 多组输入,'0'结束: 顶点的个数在3至100之间: 一定顺序输入坐标: ...

  4. Problem H: 零起点学算法109——单数变复数

    #include <stdio.h> #include<string.h> int main(void) { int n; ]; scanf("%d",&a ...

  5. Problem G: 零起点学算法106——首字母变大写

    #include<stdio.h> #include<string.h> int main(void) { ]; int i,k; while(gets(a)!=NULL) { ...

  6. Problem F: 零起点学算法42——多组测试数据输出II

    #include<stdio.h> int main() { ; while(scanf("%d%d%d",&a,&b,&c)!=EOF) { ...

  7. Problem E: 零起点学算法34——3n+1问题

    #include<stdio.h> #include<math.h> int main() { int n; n<=pow(,); ; scanf("%d&qu ...

  8. Problem K: 零起点学算法107——统计元音

    #include<stdio.h> int main() { int n; ]; while(scanf("%d%*c",&n)!=EOF) { while(n ...

  9. Problem J: 零起点学算法105——C语言合法标识符

    #include<stdio.h> #include<ctype.h>//调用isalpha函数 int main() { int n; ]; while(scanf(&quo ...

随机推荐

  1. ue4.3正式版源码链接

    ue4.3正式版源码链接 http://tieba.baidu.com/p/3170253742

  2. 基于 Arduino 开发板,这款插座是可编程且开源的

    基于 Arduino 开发板,这款插座是可编程且开源的 https://www.oschina.net/news/74861/open-source-socket https://github.com ...

  3. HDU 6109 数据分割 并查集,SET

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6109 题意:中文题面 解法:每次都贪心地尝试将尽量多的条件放进当前这组,遇到第一个与已有条件冲突时,就 ...

  4. MYSQL中INET_ATON()函数

    例如我们现在要在一个表中查出 ip 在 192.168.1.3 到 192.168.1.20 之间的 ip 地址,我们首先想到的就是通过字符串的比较来获取查找结果,但是如果我们通过这种方式来查找,结果 ...

  5. HIbernate学习笔记3 之 缓存和 对象的三种状态

    一.hibernate一级缓存 *  hibernate创建每个Session对象时,都会给该Session分配一块独立的缓冲区,用于存放Session查询出来的对象,这个分配给session的缓存区 ...

  6. 测试php单例模式和静态访问,实例化访问的效率

    // 测试的类class Memory { private static $a= null; public function __construct() { return self::$a; } pu ...

  7. linux命令(4):vmstat命令

    CPU监控如下: vmstat 2 10  //表示每隔2秒运行10次 内存监控如下: vmstat –s 监控进程及CPU.内存状态 如下: top

  8. HDU-5360

    Hiking Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Su ...

  9. C# 实现动态添加列,新增合计行,求和

    DataTable da = CommonBLL.GetList("*", "sys_dict", "IfState=1 and DictTypeId ...

  10. Markdown 表情包