-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparkour.cpp
More file actions
36 lines (29 loc) · 747 Bytes
/
parkour.cpp
File metadata and controls
36 lines (29 loc) · 747 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
// NOTE: it is recommended to use this even if you don't understand the following code.
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
// uncomment the two following lines if you want to read/write from files
// ifstream cin("input.txt");
// ofstream cout("output.txt");
int N, M;
cin >> N >> M;
// INSERT YOUR CODE HERE
if (N > M) {
cout << -1 << endl;
} else {
for (int i=0; i<N; i++) {
for (int j=0; j<i; j++) {
cout << '#';
}
for (int j=i; j<M; j++) {
cout << '.';
}
cout << endl;
}
}
return 0;
}