【Codeforces 9989C】A Mist of Florescence
【链接】 我是链接,点我呀:)
【题意】
题意
【题解】

四个大角
然后每个大角里面包着一些其他颜色的就好
【代码】
#include <bits/stdc++.h>
using namespace std;
const int N = 50;
const long long M = 15e6;
int a,b,c,d;
char ans[N+10][N+10];
void color(int x0,int y0,char key){
for (int i = 1;i <= 25;i++)
for (int j = 1;j <= 25;j++){
ans[x0+i][y0+j] = key;
}
}
void _color(int x0,int y0,int rest,char key){
if (rest>0)
for (int i = 1;i <= 25;i+=2)
for (int j = 1;j <= 25;j+=2){
ans[x0+i][y0+j] = key;
rest--;
if (rest==0) return;
}
}
int main(){
ios::sync_with_stdio(0),cin.tie(0);
cin >> a >> b >> c >> d;
a--;b--;c--;d--;
color(0,0,'A');color(0,25,'B');
color(25,0,'C');color(25,25,'D');
_color(0,0,d,'D');_color(0,25,c,'C');
_color(25,0,b,'B');_color(25,25,a,'A');
cout<<"50 50"<<endl;
for (int i = 1;i <= 50;i++){
for (int j = 1;j <= 50;j++){
cout<<ans[i][j];
}
cout<<endl;
}
return 0;
}
【Codeforces 9989C】A Mist of Florescence的更多相关文章
- 【codeforces 415D】Mashmokh and ACM(普通dp)
[codeforces 415D]Mashmokh and ACM 题意:美丽数列定义:对于数列中的每一个i都满足:arr[i+1]%arr[i]==0 输入n,k(1<=n,k<=200 ...
- 【codeforces 707E】Garlands
[题目链接]:http://codeforces.com/contest/707/problem/E [题意] 给你一个n*m的方阵; 里面有k个联通块; 这k个联通块,每个连通块里面都是灯; 给你q ...
- 【codeforces 707C】Pythagorean Triples
[题目链接]:http://codeforces.com/contest/707/problem/C [题意] 给你一个数字n; 问你这个数字是不是某个三角形的一条边; 如果是让你输出另外两条边的大小 ...
- 【codeforces 709D】Recover the String
[题目链接]:http://codeforces.com/problemset/problem/709/D [题意] 给你一个序列; 给出01子列和10子列和00子列以及11子列的个数; 然后让你输出 ...
- 【codeforces 709B】Checkpoints
[题目链接]:http://codeforces.com/contest/709/problem/B [题意] 让你从起点开始走过n-1个点(至少n-1个) 问你最少走多远; [题解] 肯定不多走啊; ...
- 【codeforces 709C】Letters Cyclic Shift
[题目链接]:http://codeforces.com/contest/709/problem/C [题意] 让你改变一个字符串的子集(连续的一段); ->这一段的每个字符的字母都变成之前的一 ...
- 【Codeforces 429D】 Tricky Function
[题目链接] http://codeforces.com/problemset/problem/429/D [算法] 令Si = A1 + A2 + ... + Ai(A的前缀和) 则g(i,j) = ...
- 【Codeforces 670C】 Cinema
[题目链接] http://codeforces.com/contest/670/problem/C [算法] 离散化 [代码] #include<bits/stdc++.h> using ...
- 【codeforces 515D】Drazil and Tiles
[题目链接]:http://codeforces.com/contest/515/problem/D [题意] 给你一个n*m的格子; 然后让你用1*2的长方形去填格子的空缺; 如果有填满的方案且方案 ...
随机推荐
- E20170609-ts
algorithm n.算法 layout n. 布局,安排,设计; 布置图,规划图; resource n. 资源; 物力,财力; 办法; 智谋; partial adj. 部分的; 偏爱的; ...
- table样式测试总结tr td宽度分析
题外话:一直以来习惯布局用ul,li样式调整比较方便,不会互相影响出现一些问题,but~现在公司涉及很多表格打印,都是用table写的,好多宽度高度合并啊,组合啊~~~,单元格之间互相影响,有的样式设 ...
- bzoj 1854: [Scoi2010]游戏【匈牙利算法】
没啥可说的,就是一边属性一边道具建二分图,把两个属性都连到道具上,然后枚举匹配,如果无法匹配就输出,时间戳优化 #include<iostream> #include<cstdio& ...
- java Class.getResource和ClassLoader.getResource
http://www.cnblogs.com/wang-meng/p/5574071.html http://blog.csdn.net/earbao/article/details/50009241 ...
- hdu2033
http://acm.hdu.edu.cn/showproblem.php?pid=2033 1 #include<stdio.h> #include<string.h> #i ...
- 数据传递--------博客-----------springMVC源码分析--RequestToViewNameTranslator请求到视图名称的转换
参考来源:http://blog.csdn.net/qq924862077/article/details/54286976?utm_source=gold_browser_extension Req ...
- Required diagnostic data collection for RMAN backup
1. Provide the alert.log and related tracefile of the target database. 2. Provide details on the l ...
- 记录sql操作
需求:一个a表的A列等于b表的B列 但拥有的相同列C列值不相同 需要将其改成一样的 UPDATE vd_auth_switch vas,tb_student ts set vas.class_id = ...
- 300 Longest Increasing Subsequence 最长上升子序列
给出一个无序的整形数组,找到最长上升子序列的长度.例如,给出 [10, 9, 2, 5, 3, 7, 101, 18],最长的上升子序列是 [2, 3, 7, 101],因此它的长度是4.因为可能会有 ...
- dubbo与zookeeper学习中的问题
环境: spring5.1.5 dubbo 2.6.2 异常信息: java.lang.NoClassDefFoundError: org/apache/curator/RetryPolicy at ...