Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int w, h, y, x;
- cin >> w >> h;
- char f[h][w], s[h][w], l[4];
- for (y = 0; y < h; ++y) for (x = 0; x < w; ++x) cin >> f[y][x];
- for (y = 0; y < h; ++y) for (x = 0; x < w; ++x) cin >> s[y][x];
- for (y = 0; y < 4; ++y) cin >> l[y];
- for (y = 0; y < h; ++y) {
- for (x = 0; x < w; ++x) cout << l[ (f[y][x]-'0') * 2 + s[y][x]-'0' ];
- cout << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement