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的更多相关文章

  1. Codeforces Round #487 (Div. 2) C. A Mist of Florescence 构造

    题意: 让你构造一个 n∗mn*mn∗m 矩阵,这个矩阵由 444 种字符填充构成,给定 444 个整数,即矩阵中每种字符构成的联通块个数,n,mn,mn,m 需要你自己定,但是不能超过505050. ...

  2. 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 ...

  3. 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 ...

  4. Codeforces Round #487 (Div. 2)

    A. A Blend of Springtime(暴力/模拟) 题目大意 给出$n$个花,每个点都有自己的颜色,问是否存在连续大于等于三个花颜色均不相同 sol 直接模拟判断即可 #include&l ...

  5. 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 ...

  6. Codeforces Round #487 (Div. 2) 跌分有感

    又掉分了 这次的笑话多了. 首先,由于CF昨天的比赛太早了,忘记了有个ER,比赛开始半个小时才发现. 于是只能今天了. 嗯哈. 今天这场也算挺早的. 嗯嗯,首先打开A题. 草草看了一遍题意,以为不是自 ...

  7. Codeforces Round #487 (Div. 2) E. A Trance of Nightfall (矩阵优化)

    题意 有一个平面 , 给你 \(n\) 个点构成一个点集 \(S\) , 一开始可以选择一个平面上任意点 \(P\) . 存在一种操作 : 1 选择一条至少 通过 \(S\) 中任意两个点以及 \(P ...

  8. 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 ...

  9. Codeforces Round #354 (Div. 2) ABCD

    Codeforces Round #354 (Div. 2) Problems     # Name     A Nicholas and Permutation standard input/out ...

随机推荐

  1. 【学亮IT手记】利用字节流复制图片

  2. VSC软件快捷键

    Shift + Alt + F  格式化 Ctrl+Shift+P, F1显示命令面板 Ctrl+P快速打开,进入File… Ctrl + Shift + N新窗口/实例 Ctrl + Shift + ...

  3. 判断浏览器是否支持H5

    window.onload = function() { if (!window.applicationCache) { alert("请升级您的浏览器版本,你的浏览器不支持HTML5!&q ...

  4. Granfana+PostgreSQL

    建表: create table pdm_log( id serial primary key, date_time timestamp with time zone DEFAULT CURRENT_ ...

  5. C# Note3:大话Ninject

    前言 之所以研究Ninject,是因为初入职在开发XX项目的ComponentService部分时用到了它,一下子发现了它的强大.渐渐地发现在项目中,有时会用到优秀的第三方开源库,这些都是前人智慧的结 ...

  6. python之路--小数据池,再谈编码,is和 == 的区别

    一 . 小数据池 # 小数据池针对的是: int, str, bool 在py文件中几乎所有的字符串都会缓存. # id() 查看变量的内存地址 s = 'attila' print(id(s)) 二 ...

  7. centso7 安装redmine

    一.安装rvm ###安装rvm gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D3 ...

  8. DAY05、基本数据类型与内置方法

    一.可变类型与不可变类型: 1.可变类型:值改变,但是id不变 2.不可变类型:值改变,id也改变 二.数据类型: 1.数字类型: 1.1:整型int: 用途:记录年龄.等级.数量 定义方式:age ...

  9. SpringBoot之整合Mybatis范例

    依赖包: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http:/ ...

  10. How to enable mp3 on Ubuntu

    apt install gstreamer1.0 libavcodec57