题意略。

思路:如图

详见代码:

#include<bits/stdc++.h>
#define maxn 55
using namespace std; char board[maxn][maxn]; void init(){
for(int i = ;i <= ;++i){
for(int j = ;j <= ;++j){
board[i][j] = 'A';
}
}
for(int i = ;i <= ;++i){
for(int j = ;j <= ;++j){
board[i][j] = 'B';
}
}
for(int i = ;i <= ;++i){
for(int j = ;j <= ;++j){
board[i][j] = 'C';
}
}
for(int i = ;i <= ;++i){
for(int j = ;j <= ;++j){
board[i][j] = 'D';
}
}
} int main(){
init();
int a,b,c,d;
scanf("%d%d%d%d",&a,&b,&c,&d);
--a,--b,--c,--d;
for(int i = ;i <= ;i += ){
if(a == ) break;
for(int j = ;j <= ;j += ){
if(a == ) break;
board[i][j] = 'A';
--a;
}
}
for(int i = ;i <= ;i += ){
if(b == ) break;
for(int j = ;j <= ;j += ){
if(b == ) break;
board[i][j] = 'B';
--b;
}
}
for(int i = ;i <= ;i += ){
if(c == ) break;
for(int j = ;j <= ;j += ){
if(c == ) break;
board[i][j] = 'C';
--c;
}
}
for(int i = ;i <= ;i += ){
if(d == ) break;
for(int j = ;j <= ;j += ){
if(d == ) break;
board[i][j] = 'D';
--d;
}
}
printf("50 50\n");
for(int i = ;i <= ;++i){
for(int j = ;j <= ;++j){
printf("%c",board[i][j]);
}
printf("\n");
} return ;
}

最新文章

  1. Apache Shiro系列二,概述 —— 基本概念
  2. WinForm窗体嵌入
  3. js实现倒计时效果
  4. The content of the adapter has changed but ListView did not receive a notification
  5. sql: sq_helptext
  6. MongoDB学习笔记——数据库安装及配置
  7. 转:C/C++中,空数组、空类、类中空数组的解析及其作用
  8. android 自动化压力测试-monkey 3 命令参数
  9. 雷军的B面:那些赔到血本无归的失败投资案例
  10. 将日志写入Debug窗口
  11. 32位程序在64位系统上获取系统安装时间(要使用KEY_WOW64_64KEY标记)
  12. Android的root学习
  13. 如何在自己的网页上插入一个超链接,发起临时qq会话
  14. Encryption and decryption、Steganography、Decryption Tools
  15. IDEA配合Flash CS6开发Flash项目--配置篇
  16. systemctl命令是系统服务管理器指令,它实际上将 service 和 chkconfig 这两个命令组合到一起。
  17. srilm使用杂记
  18. [转]Android适配器之ArrayAdapter、SimpleAdapter和BaseAdapter的简单用法与有用代码片段
  19. android.animation(3) - ValueAnimator-ofObject(TypeEvaluator evaluator, Object... values)
  20. jetbrains系列激活

热门文章

  1. 月薪12k的零基础自学前端必备手册
  2. 使用.net core基于Razor Pages开发网站一些工作笔记
  3. mount命令中offset参数的意义
  4. sort+结构体+简单数学+暴力-例题
  5. (读论文)推荐系统之ctr预估-NFM模型解析
  6. python pip安装requests库总提示:Fatal error in launcher...&#39;&#39;
  7. IDEA自定义配置
  8. Golang版本的rocksdb-对gorocksdb的封装
  9. JAVA并发之阻塞队列浅析
  10. web渗透---第一天