-
Notifications
You must be signed in to change notification settings - Fork 1
/
P11383.cpp
36 lines (30 loc) · 922 Bytes
/
P11383.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <iostream>
#include <memory>
int main() {
int width, height;
std::cin >> height >> width;
const int realWidth = width + 1;
const int resizedWidth = width * 2;
const int realResizedWidth = resizedWidth + 1;
std::unique_ptr<char[]> org(new char[realWidth * height + 1]{ 0 });
for (int h = 0; h < height; ++h) {
std::cin >> &org[h * realWidth];
org[(h + 1) * realWidth - 1] = '\n';
}
std::unique_ptr<char[]> resized(new char[realResizedWidth * height + 1]{ 0 });
for (int h = 0; h < height; ++h) {
std::cin >> &resized[h * realResizedWidth];
resized[(h + 1) * realResizedWidth - 1] = '\n';
}
for (int h = 0; h < height; ++h) {
for (int w = 0; w < width; ++w) {
const char c = org[h * realWidth + w];
if (c != resized[h * realResizedWidth + w * 2] ||
c != resized[h * realResizedWidth + w * 2 + 1]) {
std::cout << "Not Eyfa";
return 0;
}
}
}
std::cout << "Eyfa";
}