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. CMake--List用法

    list(LENGTH <list><output variable>) list(GET <list> <elementindex> [<ele ...

  2. centOS7搭建NFS服务器

    借鉴别人这篇博客搭建成功的:http://blog.51cto.com/mrxiong2017/2087001 NFS系统:用来共享文件.图片.视频 准备两个centOS7服务器,一个作NFS ser ...

  3. 谈谈对C#中反射的一些理解和认识(下)

    在上一篇中我们列举了一些反射的常规的使用,这一篇我们将介绍一些关于关于反射的高级属性,这些包括创建对反射的性能的总结以及如何优化反射性能,以及通过InvokeMember的方法如何去调用反射等等,通过 ...

  4. Entity Framework 6 自定义连接字符串ConnectionString连接MySQL

    在开始介绍之前,首先来看看官方对Entity Framework的解释:Entity Framework (EF) is an object-relational mapper that enable ...

  5. 如何快速定位到DBGrid的某一行!!!急...

    比如我查找张三,那么DBGrid就可以定位到张三那行并选中这行,除了用循环实现还有没有快速定位的方法,谢谢! 解决方案 » to SuperTitan001 那如何找到张三的这行呢?除了用循环还有什么 ...

  6. java中的序列化和反序列化

    package cn.zhou; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.Fil ...

  7. 学习 Spring (九) 注解之 @Required, @Autowired, @Qualifier

    Spring入门篇 学习笔记 @Required @Required 注解适用于 bean 属性的 setter 方法 这个注解仅仅表示,受影响的 bean 属性必须在配置时被填充,通过在 bean ...

  8. python 模块之-time

    python 模块time import time # 1 time() :返回当前时间的时间戳 time.time() #1473525444.037215 #------------------- ...

  9. ubuntu 14.04zabbix的安装

    开始安装 64位  Ubuntu 14.04.5 LTS \n \l 安装zabbix的源,以下操作在root下进行 # wget http://repo.zabbix.com/zabbix/3.0/ ...

  10. luogu P1077 摆花

    这道题看似好难,但是其实很简单 先把题目中所让你设的变量都设好,该输入的都输入 你会发现这道题好像成功了一半,为什么呢??? 因为设完后你会发现你不需要再添加任何变量,已经足够了. 可能最难的地方,就 ...