记录编号 381488 评测结果 AAAAAAAAAA
题目名称 失落的猴子 最终得分 100
用户昵称 GravatarHeHe 是否通过 通过
代码语言 C++ 运行时间 0.708 s
提交时间 2017-03-11 20:11:48 内存使用 1.29 MiB
显示代码纯文本
#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;

#define is_num(tmp) (tmp<='9' and tmp>='0')
inline int in(void){
	char tmp=getchar();
	int res=0, f=1;
	while(!(is_num(tmp)|| tmp=='-'))tmp= getchar(); 
	if(tmp=='-')f=-1,tmp=getchar();
	while(is_num(tmp))
		res=(res<<1)+(res<<3)+(tmp^48),
		tmp=getchar();
	return res*f;
}

char map[1010][1010];
int N, M, K;
int x1, y1, x2, y2, k;

int main(){
#ifndef LOCAL
	freopen("lostmonkey.in", "r", stdin);
	freopen("lostmonkey.out", "w", stdout);
#endif
	N=in(), M=in(), K=in();
	
	for(int i=1; i<=K; ++i){
		x1=in(), y1=in(), x2=in(), y2=in(), k=in();
		int l=y2-y1+1;
		for(int j=x1;j<=x2;++j)
		  memset(&map[j][y1],k,l);
	}
	for(int i=1; i<=N; ++i){
		for(int j=1; j<=M; ++j){
			printf("%d", (int)map[i][j]);
		}
		putchar('\n');
	}
}