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 ...
随机推荐
- C#复习笔记(5)--C#5:简化的异步编程(异步编程的深入分析)
首先,阐明一下标题的这个“深入分析”起得很惭愧,但是又不知道该起什么名字,这个系列也主要是做一些复习的笔记,供自己以后查阅,如果能够帮助到别人,那自然是再好不过了. 然后,我想说的是异步方法的状态机真 ...
- MyEclipse 配置 Tomcat
安装好Tomcat,MyEclipse 之后,利用这两个工具可以开发部署Web 应用,步骤相对手动部署要简洁的多,这里有一个特别要注意的地方:系统里安装JDK.Tomcat.MyEclipse 的版本 ...
- 【学亮IT手记】Servlet的生命周期
1.1 Servlet的生命周期 1.1.1 Servlet的生命周期概述 1.1.1.1 什么是生命周期 生命周期:一个对象从创建到销毁过程. 1.1.1.2 Servlet的生命周期(*****) ...
- git fetch 更新远程代码到本地仓库
理解 fetch 的关键, 是理解 FETCH_HEAD,FETCH_HEAD指的是: 某个branch在服务器上的最新状态’.这个列表保存在 .Git/FETCH_HEAD 文件中, 其中每一行对应 ...
- Hbase API
- java学习之—合并两个数组并排序
/** * 合并两个数组并排序 * Create by Administrator * 2018/6/26 0026 * 下午 4:29 **/ public class MergeApp { pub ...
- sql查询(转)
http://www.51testing.com/html/41/n-4421541.html 1 负向条件查询(例如:!=.not in.not exists)都是不能使用索引,少用 可以使用:se ...
- vpx
VPX 编辑 本词条缺少名片图,补充相关内容使词条更完整,还能快速升级,赶紧来编辑吧! VPX总线是VITA(VME International Trade Association, VME国际贸易协 ...
- Nginx 优化缓冲区与传输效率
L:126 这里简单的做个计算 比如 我的服务器带宽是 5M=41943040字节 如果按照公网用PIND的得到延迟结果 icmp_seq=3 ttl=49 time=35.612 ms BDP = ...
- linux查找符合条件的文件并删除
找到根目录下所有的以test开头的文件并把查找结果当做参数传给rm -rf命令进行删除: 1.find / -name “test*” |xargs rm -rf 2.find / -name “te ...