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. Oracle 条件判断函数decode和case when then案例

    --decode条件判断函数 ,,,,,) from dual --需求:不通过连表查询,显示业主类型名称列的值 ,,,'商业','其他') from t_owners --case when the ...

  2. mysql数据库在linux上的不同登录方式和权限

    在我的上两篇博文里,一篇是安装,一篇是配置远程登录, 提君博客原创 >>提君博客原创  http://www.cnblogs.com/tijun/  << 所以我的mysql的 ...

  3. windows浏览器访问虚拟机开的rabbitmq服务,无法访问

    根据这个博主的建议 https://blog.csdn.net/csdnliuxin123524/article/details/78207427 换了一个浏览器上火狐浏览器输入“localhost: ...

  4. Hbase存储思想

  5. swagger bug

    https://blog.csdn.net/u011943534/article/details/81778125 处理swagger报错Could not resolve pointer: /def ...

  6. mybatis:数据持久层框架

    mybatis是一个持久层的框架,是Apache下的顶级项目. mybatis托管到goolecode下,再后来托管到GitHub下:https://github.com/mybatis/mybati ...

  7. Eclipse配置C++时的三个关键环境变量

    ECLIPSE下载很简单,然后装上MinGW,安装就完成了,关键是要配置三个环境变量 include——C:\MinGW\include lib——C:\MinGW\lib path——C:\MinG ...

  8. js 中常用的循环

    参考文章: 1.js几种数组遍历方式以及性能分析对比 2.javaScript遍历对象.数组总结 首先是数组中可以使用的 1.for 循环 for (let i = 0; i < xxx.len ...

  9. PCIE

    ---恢复内容开始--- 高速差分总线.串行总线 每一条PCIe链路中只能连接两个设备这两个设备互为是数据发送端和数据接收端.PCIe链路可以由多条Lane组成,目前PCIe链路×1.×2.×4.×8 ...

  10. c++创建文件夹以及子文件夹

    #ifdef WIN32 #include <io.h> #include <direct.h> #else #include <unistd.h> #includ ...