-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathccc11s3.cpp
More file actions
49 lines (38 loc) · 965 Bytes
/
ccc11s3.cpp
File metadata and controls
49 lines (38 loc) · 965 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
43
44
45
46
47
48
49
#include <vector>
#include <algorithm>
#include <iostream>
#include <cmath>
using namespace std;
typedef long long ll;
vector<vector<vector<bool>>> grid;
bool make() {
for (int m = 1; m <= 13; m++) {
ll n = pow(5, m);
grid[m] = vector<vector<bool>>(n, vector<bool>(n));
for (int i = n-1; i >= n-(n/5); i--) {
for (int j = n/5; j < n-(n/5); j++) {
grid[m][i][j] = true;
}
}
for (int i = n-(2*n/5); i <= n-(n/5); i--) {
for (int j = n/5*2; j < n-(2*n/5); j++) {
grid[m][i][j] = true;
}
}
}
}
int main() {
ios_base::sync_with_stdio(0); cin.tie(0);
int n; cin >> n;
make();
return 0;
for (int i = 0; i < n; i++) {
int m, x, y; cin >> m >> x >> y;
if (grid[m][x][y]) {
cout << "crystal" << "\n";
}
else {
cout << "empty" << "\n";
}
}
}