记录编号 |
420277 |
评测结果 |
AAAAAAAAAA |
题目名称 |
失落的猴子 |
最终得分 |
100 |
用户昵称 |
kZime |
是否通过 |
通过 |
代码语言 |
C++ |
运行时间 |
0.381 s |
提交时间 |
2017-07-04 12:06:05 |
内存使用 |
1.77 MiB |
显示代码纯文本
# include <bits/stdc++.h>
# define col (b2 - b1 + 1)
using namespace std;
char buf[1 << 18], *fs, *ft;
char ops[1 << 18], *opt = ops, *opt_end = ops + (1 << 18);
inline char getc() {
return (fs == ft && (ft = (fs = buf) + fread(buf, 1, 1 << 18, stdin)), fs == ft) ? EOF : *fs++;
}
inline void oall() {
fwrite(ops, 1, opt - ops, stdout);
opt = ops;
}
inline void oendl() {
*(opt++) = '\n';
if(opt == opt_end) oall();
}
inline void ochar(char x) {
*(opt++) = x;
if(opt == opt_end) oall();
}
inline int gn() {
int k = 0, f = 1;
char c = getc();
for(; !isdigit(c); c = getc()) if(c == '-') f = -1;
for(; isdigit(c); c = getc()) k = k * 10 + c - '0';
return k * f;
}
int n, m, k, a1, a2, b1, b2, l;
char mp[1001][1001];
int main() {
# ifndef LOCAL
freopen("lostmonkey.in", "r", stdin);
freopen("lostmonkey.out", "w", stdout);
# else
freopen("in", "r", stdin);
freopen("out", "w", stdout);
# endif
n = gn(), m = gn(), k = gn();
for(int i = 1; i <= k; i++) {
a1 = gn(), b1 = gn(), a2 = gn(), b2 = gn(), l = gn();
for(int i = a1; i <= a2; i++)
memset(mp[i] + b1, l, col);
}
for(int i = 1; i <= n; i++) {
for(int j = 1; j <= m; j++)
ochar(mp[i][j] + 48);
oendl();
}
oall();
return 0;
}