Codeforces Round #210 (Div. 2) A. Levko and Table

时间:2022-03-29 09:05:28

让对角线的元素为k就行

#include <iostream>
using namespace std; int main() {
int n,k;
cin >> n >> k;
for(int i = ; i < n; ++ i){
for(int j = ; j < n ; ++ j){
if(j != ) cout<<" ";
if( i == j) cout<<k;
else cout<<;
}
cout<<endl;
}
return ;
}

Codeforces Round #210 (Div. 2) A. Levko and Table的更多相关文章

  1. Codeforces Round &num;210 &lpar;Div&period; 2&rpar; C&period; Levko and Array Recovery

    题目链接 线段树的逆过程,想了老一会,然后发现应该是包含区间对存在有影响,就不知怎么做了...然后尚大神,说,So easy,你要倒着来,然后再正着来,判断是不是合法就行了.然后我乱写了写,就过了.数 ...

  2. 水题 Codeforces Round &num;308 &lpar;Div&period; 2&rpar; A&period; Vanya and Table

    题目传送门 /* 水题:读懂题目就能做 */ #include <cstdio> #include <iostream> #include <algorithm> ...

  3. CodeForces 360E Levko and Game(Codeforces Round &num;210 &lpar;Div&period; 1&rpar;)

    题意:有一些无向边m条权值是给定的k条权值在[l,r]区间可以由你来定,一个点s1 出发一个从s2出发  问s1 出发的能不能先打到f 思路:最短路. 首先检测能不能赢 在更新的时候  如果对于一条边 ...

  4. Codeforces Round &num;210 &lpar;Div&period; 1&rpar;&period;B

    经典的一道DP题. 题目明显是一道DP题,但是比赛的时候一个劲就在想怎么记录状态和转移.最后想到了一种n^3的方法,写了下,不出所料的超时了. 看了别人的代码才发现竟然是先二分然后再进行DP,像这种思 ...

  5. Codeforces Round &num;311 &lpar;Div&period; 2&rpar; C&period; Arthur and Table Multiset

    C. Arthur and Table Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/557/p ...

  6. Codeforces Round &num;308 &lpar;Div&period; 2&rpar; A&period; Vanya and Table 暴力

    A. Vanya and Table Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/552/pr ...

  7. CF Codeforces Round &num;256 &lpar;Div&period; 2&rpar; D &lpar;448D&rpar; Multiplication Table

    二分!!! AC代码例如以下: #include<iostream> #include<cstring> #include<cstdio> #define ll l ...

  8. Codeforces Round &num;311 &lpar;Div&period; 2&rpar;C&period; Arthur and Table

    C. Arthur and Table time limit per test 1 second memory limit per test 256 megabytes input standard ...

  9. Codeforces Round &num;366 &lpar;Div&period; 2&rpar; ABC

    Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate ...

随机推荐

  1. PG 中 JSON 字段的应用

    13 年发现 pg 有了 json 类型,便从 oracle 转 pg,几年下来也算比较熟稔了,总结几个有益的实践. 用途一:存储设计时无法预料的文档性的数据.比如,通常可以在人员表准备一个 json ...

  2. c&num; ConfigurationSection

    怎么把自己的配置文件配置到app.config中? 方案1:在app.config中添加 <!--应用配置--> <appSettings configSource="Co ...

  3. angualrjs

    $rootScope是angularJS中最接近全局作用域的对象.在$rootScope上附加太多业务逻辑并不是好主意,这与污染JavaScript的全局作用域是一样的. $scope对象就是一个普通 ...

  4. Appium移动自动化测试(二)--安装Android开发环境

    继续Appium环境的搭建. 第二节  安装Android开发环境 如果你的环境是MAC那么可以直接跳过这一节.就像我们在用Selenium进行web自动化测试的时候一样,我们需要一个浏览器来执行测试 ...

  5. css3学习总结4--CSS3背景

    css3背景 1. background-size 2. background-origin 3. background-clip 示例: className { background:url(bg_ ...

  6. 社区商业试玩O2O:良渚文化村新街坊牵手阿里巴巴

    在电商时代,越来越多的人选择便捷的网上购物,使得实体商业受到了不小的冲击,各种大型的购物中心.购物广场已经不再那么人气十足,因此一些特色商业街区.社区商业频频出现,也不乏一些新玩儿法. 阿里巴巴(专题 ...

  7. PAT1020 &lpar;已知中序,后序遍历转前序遍历&rpar;

    已知后序与中序输出前序(先序):后序:3, 4, 2, 6, 5, 1(左右根)中序:3, 2, 4, 1, 6, 5(左根右) 已知一棵二叉树,输出前,中,后时我们采用递归的方式.同样也应该利用递归 ...

  8. 基于OpenGL编写一个简易的2D渲染框架-03 渲染基本几何图形

    阅读文章前需要了解的知识,你好,三角形:https://learnopengl-cn.github.io/01%20Getting%20started/04%20Hello%20Triangle/ 要 ...

  9. springmvc接收date类型参数

    springmvc在表单提交接收date类型参数的时候会报错:Cannot convert value of type [java.lang.String] to required type [jav ...

  10. Generator 函数的异步应用

    异步编程对 JavaScript 语言太重要.Javascript 语言的执行环境是“单线程”的,如果没有异步编程,根本没法用,非卡死不可.本章主要介绍 Generator 函数如何完成异步操作. 传 ...