思路:
构造题。

实现:

 #include <bits/stdc++.h>
using namespace std;
int a[][];
int main()
{
int r, c;
while (cin >> r >> c)
{
if (c == )
{
if (r == ) cout << << endl;
else
{
for (int i = ; i <= r; i++)
{
cout << i + << endl;
}
}
continue;
}
for (int i = ; i <= r; i++)
{
for (int j = ; j <= c; j++)
{
a[i][j] = i * (j + r);
cout << a[i][j] << " ";
}
cout << endl;
}
}
return ;
}

CF1266C Diverse Matrix的更多相关文章

  1. Codeforces Global Round 6

    久违的写篇博客吧  A. Competitive Programmer 题目链接:https://codeforces.com/contest/1266/problem/A 题意: 给你一个只包含数字 ...

  2. Matrix Factorization, Algorithms, Applications, and Avaliable packages

    矩阵分解 来源:http://www.cvchina.info/2011/09/05/matrix-factorization-jungle/ 美帝的有心人士收集了市面上的矩阵分解的差点儿全部算法和应 ...

  3. angular2系列教程(十一)路由嵌套、路由生命周期、matrix URL notation

    今天我们要讲的是ng2的路由的第二部分,包括路由嵌套.路由生命周期等知识点. 例子 例子仍然是上节课的例子:

  4. Pramp mock interview (4th practice): Matrix Spiral Print

    March 16, 2016 Problem statement:Given a 2D array (matrix) named M, print all items of M in a spiral ...

  5. Atitit Data Matrix dm码的原理与特点

    Atitit Data Matrix dm码的原理与特点 Datamatrix原名Datacode,由美国国际资料公司(International Data Matrix, 简称ID Matrix)于 ...

  6. Android笔记——Matrix

    转自:http://www.cnblogs.com/qiengo/archive/2012/06/30/2570874.html#translate Matrix的数学原理 在Android中,如果你 ...

  7. 通过Matrix进行二维图形仿射变换

    Affine Transformation是一种二维坐标到二维坐标之间的线性变换,保持二维图形的"平直性"和"平行性".仿射变换可以通过一系列的原子变换的复合来 ...

  8. [LeetCode] Kth Smallest Element in a Sorted Matrix 有序矩阵中第K小的元素

    Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth ...

  9. [LeetCode] Longest Increasing Path in a Matrix 矩阵中的最长递增路径

    Given an integer matrix, find the length of the longest increasing path. From each cell, you can eit ...

随机推荐

  1. Web API系列(二) Filter的使用以及执行顺序

    在WEB Api中,引入了面向切面编程(AOP)的思想,在某些特定的位置可以插入特定的Filter进行过程拦截处理.引入了这一机制可以更好地践行DRY(Don’t Repeat Yourself)思想 ...

  2. C++问题--Reis连接redisContext *pRedisContext = redisConnectWithTimeout("127.0.0.1", 6379, tv);pRedisContext->errstr返回错误磁盘空间不足

    一.问题 使用C++连接Redis的时候出错,错误String为磁盘空间不足,连接代码如下: //reids默认监听端口6387 ; struct timeval tv; tv.tv_sec = iT ...

  3. 贪心算法训练(九)——Best Cow Line(字典序最小问题)

    原题链接:Best Cow Line 1. 问题描述 2. 输入 6 A C D B C B 3. 输出 ABCBCD 4.思路分析 不断地取原字符串 S 中开头和末尾比较小的字符串放到 T 的末尾 ...

  4. 【洛谷】P4139 上帝与集合的正确用法

    题目描述 根据一些书上的记载,上帝的一次失败的创世经历是这样的:  第一天,上帝创造了一个世界的基本元素,称做“元”.  第二天,上帝创造了一个新的元素,称作“α”.“α”被定义为“元”构成的集合.容 ...

  5. select2多选设置select多选,select2取值和赋值

    select2设置select多选,select2取值和赋值,作为筛选条件的时候,取值相对简单,把选中的id值转为字符串传给后端查询,查询之后会刷新页面,为了在下拉框中显示刚刚选中的值,就需要给sel ...

  6. nginx+keepalived高可用实战

    1.整体架构图如下 2.环境准备 今天所配置的是keepalived+nginx 的负载均衡 下载keepalived软件 [root@LB01 tools]# wget http://www.kee ...

  7. 深入理解document.referrer的用法

    前言 在JavaScript中,document对象有很多属性,其中有3个与对网页的请求有关的属性,它们分别是URL.domain和referrer. URL属性包含页面完整的URL,domain属性 ...

  8. 找到树中指定id的所有父节点

    const data = [{ id: 1, children: [{ id: 2, children: [{ id: 3, }, { id: 4, }], }], }, { id: 5, child ...

  9. 三大框架 之 Hibernate框架概述(概述、配置、核心API)

    目录 Hibernate框架概述 什么是框架 hibernate简介(JavaEE技术三层架构所用到的技术) hibernate是什么框架 ORM hibernate好处 Hibernate基本使用 ...

  10. 【深度学习】关于Adam

    版权声明:本文为博主原创文章,遵循CC 4.0 by-sa版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/weixin_31866177/articl ...