-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBEE-1516.cpp
More file actions
42 lines (33 loc) · 860 Bytes
/
Copy pathBEE-1516.cpp
File metadata and controls
42 lines (33 loc) · 860 Bytes
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
37
38
39
40
41
42
#include <iostream>
#include <vector>
int main()
{
while (true) {
std::vector<std::string> map {};
int n, m;
std::cin >> n >> m;
if (n + m == 0) break;
for (int i = 0; i < n; i++) {
std::string line {};
std::cin >> line;
map.push_back(line);
}
int a, b;
std::cin >> a >> b;
int msc = b / m;
int nsc = a / n;
for (int i = 0; i < n; i++) {
std::string line = map[i];
std::string scaled {};
for (int j = 0; j < m; j++) {
char element = line[j];
scaled += std::string(msc, element);
}
for (int j = 0; j < nsc; j++) {
std::cout << scaled << "\n";
}
}
std::cout << "\n";
}
return 0;
}