D - X and paintings

 1 //模拟题
 2 #include <bits/stdc++.h>
 3 using namespace std;
 4 char ma[250][250];
 5 int main()
 6 {
 7     int n;
 8     scanf("%d",&n);
 9     while(n--)
10     {
11         memset(ma,‘.‘,sizeof(ma));
12         int x,y,m;
13         scanf("%d%d%d",&x,&y,&m);
14         int x1,x2,y1,y2;
15         char c;
16         for(int t=0;t<m;t++)
17         {
18             scanf("%d %d %d %d %c",&x1,&y1,&x2,&y2,&c);
19             for(int i=x1;i<=x2;i++)
20                 for(int j=y1;j<=y2;j++)
21                 ma[i][j]=c;
22         }
23         for(int i=1;i<=x;i++)
24         {
25             for(int j=1;j<=y;j++)
26                 printf("%c",ma[i][j]);
27             printf("\n");
28         }
29     }
30 }
时间: 2024-12-28 01:33:08

D - X and paintings的相关文章

[2016-03-08][651][codeforces][B][Beautiful Paintings]

[2016-03-08][651][[codeforces]][B][Beautiful Paintings] 题目编号:CF 651 B 题目大意:画展有n个画,每个画beauty值已知,客人每经过一个比之前一个画更美的,客人会变得beauty,重新安排画的顺序,求客人开心时间的最大值 输入:n 和每个话的beauty 输出:时间 分析: 如果beauty为a的画,数量为 k,那么beaty小于或者大于a的k个,总能安排让客人开心,所以,除了数量k最大的那个beauty之外,每个beauty总

[2016-3-8]OMG美语每日笔记-Do you like art?What type of paintings do you like?and do you have favorite artist?

坚持~坚持~坚持~! Do you like art?What type of paintings do you like?and do you have favorite artist? oil painting 油画 incredible colors 不可思议的色彩 Check out this oil painting it's my favorite painting in the entire museum. 来看看这幅画,这是整个博物馆我最喜欢的画 Wow.The artist u

CodeForces 651B Beautiful Paintings 贪心

A. Joysticks time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Friends are going to play console. They have two joysticks and only one charger for them. Initially first joystick is charged at

Beautiful Paintings

There are n pictures delivered for the new exhibition. The i-th painting has beauty ai. We know that a visitor becomes happy every time he passes from a painting to a more beautiful one. We are allowed to arranged pictures in any order. What is the m

The 2019 China Collegiate Programming Contest Harbin Site A - Artful Paintings 差分约束

#include<map> #include<queue> #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; #define ll long long const int N=1e5+5; const int M=1e5+5; const int INF=0x3f3f3f3f; int read(

bzoj 4780: [Usaco2017 Open]Modern Art 2

4780: [Usaco2017 Open]Modern Art 2 Time Limit: 10 Sec  Memory Limit: 128 MB Description Having become bored with standard 2-dimensional artwork (and also frustrated at others copying her w ork), the great bovine artist Picowso has decided to switch t

电影功夫熊猫使用的单词分析

你英语四级过了吗?功夫熊猫看了吗?功夫熊猫使用了995个英语单词,你会说很简单吧,别急,我给你分析一下,这些单词中有236个单词不在四级词汇范围内,花两分钟时间看看你是否认识这些单词,单词后面跟的数字表示该单词在电影中出现的次数. 你也可以获取本文的分析程序,这样你就可以分析其他电影了.看一部电影之前,先通过这种方式分析一下,然后学习自己不认识的单词,然后再去看电影,如此这样坚持下去,英语水平就会有很大的提升. words(995): 1. you 2492. the 1893. i 1844.

HDU 5023 A Corrupt Mayor&#39;s Performance Art (线段树)

A Corrupt Mayor's Performance Art Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 100000/100000 K (Java/Others) Total Submission(s): 255    Accepted Submission(s): 114 Problem Description Corrupt governors always find ways to get dirty money.

Cube painting UVA 253

说说:一看到给立方体染色,开始还有点小害怕.毕竟高中数学里染色问题从来都不会简单.这道题的意思就是给立方体的六个面染色,然后判断两个染了色的立方体是否一样.其实仔细一想,立方体无非三对面,若开始确定两对面.如下面图Figure 1所示:假设1,2,6,5这四个面先确定(这只有唯一一种情况)之后,再放3,4,的时候无非两种情况.但这两种情况是不一样的,这也许就是题目所说的reflection.开始的想法是找出三对面,然后比较是否相等即可,不过实在想不出怎样来排除reflection的情况.所以只能