Codeforces Round #487 (Div. 2) C - A Mist of Florescence
把50*50的矩形拆成4块
#include<bits/stdc++.h>
using namespace std;
],b[];
][];
void init(int x,int y,int xx,int yy,int va){
for(int j=x;j<=xx;j++){
for(int k=y;k<=yy;k++){
mp[j][k]=va;
}
}
}
void work(int x,int y,int xx,int yy,int va,int i){
if(b[va]>=a[va]) return ;
){
for(int k=y;k<=yy;k++){
][k]!=va&&mp[j-][k]!=va&&mp[j][k-]!=va&&mp[j][k+]!=va){
mp[j][k]=va;
b[va]++;
if(b[va]>=a[va]) return ;
}
}
}
}
int main(){
;j<=;j++){
cin>>a[j];
a[j]--;
b[j]=;
}
init(,,,,);
init(,,,,);
init(,,,,);
init(,,,,);
;j<=;j++){
if(b[j]<a[j]){
work(,,,,j,);
work(+,+,-,-,j,);
work(+,+,-,-,j,);
work(+,+,-,-,j,);
}
}
cout<<"50 50"<<endl;
;j<=;j++){
;k<=;k++){
){
cout<<"A";
}
){
cout<<"B";
}
){
cout<<"C";
}
){
cout<<"D";
}
}
cout<<endl;
}
}
Codeforces Round #487 (Div. 2) C - A Mist of Florescence的更多相关文章
- Codeforces Round #487 (Div. 2) C. A Mist of Florescence 构造
题意: 让你构造一个 n∗mn*mn∗m 矩阵,这个矩阵由 444 种字符填充构成,给定 444 个整数,即矩阵中每种字符构成的联通块个数,n,mn,mn,m 需要你自己定,但是不能超过505050. ...
- C. A Mist of Florescence ----- Codeforces Round #487 (Div. 2)
C. A Mist of Florescence time limit per test 1 second memory limit per test 256 megabytes input stan ...
- Codeforces Round #487 (Div. 2) A Mist of Florescence (暴力构造)
C. A Mist of Florescence time limit per test 1 second memory limit per test 256 megabytes input stan ...
- Codeforces Round #487 (Div. 2)
A. A Blend of Springtime(暴力/模拟) 题目大意 给出$n$个花,每个点都有自己的颜色,问是否存在连续大于等于三个花颜色均不相同 sol 直接模拟判断即可 #include&l ...
- code forces Codeforces Round #487 (Div. 2) C
C. A Mist of Florescence time limit per test 1 second memory limit per test 256 megabytes input stan ...
- Codeforces Round #487 (Div. 2) 跌分有感
又掉分了 这次的笑话多了. 首先,由于CF昨天的比赛太早了,忘记了有个ER,比赛开始半个小时才发现. 于是只能今天了. 嗯哈. 今天这场也算挺早的. 嗯嗯,首先打开A题. 草草看了一遍题意,以为不是自 ...
- Codeforces Round #487 (Div. 2) E. A Trance of Nightfall (矩阵优化)
题意 有一个平面 , 给你 \(n\) 个点构成一个点集 \(S\) , 一开始可以选择一个平面上任意点 \(P\) . 存在一种操作 : 1 选择一条至少 通过 \(S\) 中任意两个点以及 \(P ...
- Codeforces Round #366 (Div. 2) ABC
Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate ...
- Codeforces Round #354 (Div. 2) ABCD
Codeforces Round #354 (Div. 2) Problems # Name A Nicholas and Permutation standard input/out ...
随机推荐
- Azure系列2.1.13 —— CloudBlockBlob
(小弟自学Azure,文中有不正确之处,请路过各位大神指正.) 网上azure的资料较少,尤其是API,全是英文的,中文资料更是少之又少.这次由于公司项目需要使用Azure,所以对Azure的一些学习 ...
- mybatis一级缓存详解
mybatis缓存分为一级缓存,二级缓存和自定义缓存.本文重点讲解一级缓存 一:前言 在介绍缓存之前,先了解下mybatis的几个核心概念: * SqlSession:代表和数据库的一次会话,向用户提 ...
- linux之硬盘管理fdisk
1.首先我们用虚拟机模拟服务器加入一块新的硬盘,硬盘容量入下图5GB硬盘. 2.首先我们要对它进行分区,我们从上面知道需要分区格式化的是第二块硬盘. 3.输入n回车是新建分区,p是主分区(只能建立4个 ...
- Mybatis核心配置文件SqlMapConfig.xml
配置内容: SqlMapConfig.xml中配置的内容和顺序如下: 1.properties(属性) 2.settings(全局配置参数) 3.typeAliases(类型别名) 4.typeHan ...
- Prism框架研究(三)
这一篇主要用来介绍一下基于Prism Library中的核心服务以及如何配置Container,还有一个重要的部分是如何管理各个组件之间的依赖性,下面就这些内容来做一一的介绍. 1 Prism中的核心 ...
- Centos rpm包安装PHP所需包
yum -y install php php-devel php-fpm php-xml php-pdo php-ldap php-mysql
- Plugin/Preset files are not allowed to export objects,webpack报错/babel报错的解决方法
1.为什么会报错 ? 这里抱着错误是因为 babel 的版本冲突. 多是因为你的 babel 依赖包不兼容. 可以查看你的 package.json 的依赖列表 即有 babel 7.0 版本的( @ ...
- (转载)C#使用MemoryStream类读写内存
MemoryStream和BufferedStream都派生自基类Stream,因此它们有很多共同的属性和方法,但是每一个类都有自己独特的用法.这两个类都是实现对内存进行数据读写的功能,而不是对持久性 ...
- LODOP设置打印机不存在不打印
LODOP中打印机的选择有优先级的存在,如果程序中指定的是错误的打印机,那么会走下一个优先级,这样,就可能存在选择了打印机无效,从默认打印机打印出来了,可以在代码里加判断避免这一点. 打印机优先级简介 ...
- Running Web API using Docker and Kubernetes
Context As companies are continuously seeking ways to become more Agile and embracing DevOps culture ...