| Task: | Kartta |
| Sender: | ollpu |
| Submission time: | 2021-12-09 15:48:49 +0200 |
| Language: | C++ (C++17) |
| Status: | READY |
| Result: | 100 |
| group | verdict | score |
|---|---|---|
| #1 | ACCEPTED | 12 |
| #2 | ACCEPTED | 27 |
| #3 | ACCEPTED | 15 |
| #4 | ACCEPTED | 46 |
| test | verdict | time | group | |
|---|---|---|---|---|
| #1 | ACCEPTED | 0.02 s | 1 | details |
| #2 | ACCEPTED | 0.03 s | 2 | details |
| #3 | ACCEPTED | 0.03 s | 3 | details |
| #4 | ACCEPTED | 0.05 s | 4 | details |
Code
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, m, h;
cin >> n >> m >> h;
char k[40][n][m];
for (int i = 0; i < n; ++i) {
for (int j = 0; j < m; ++j) {
k[0][i][j] = 'V';
for (int ki = 1; ki < 40; ++ki) k[ki][i][j] = 'L';
}
}
const int T = 9;
for (int i = 0; i < n; ++i) {
for (int j = 0; j < m; ++j) {
int x;
cin >> x;
if (x != h) {
for (int t = 0; t < T; ++t) {
int ov = x % 3;
x /= 3;
if (ov == 0) {
k[1+3*t][i][j] = 'L';
k[1+3*t+1][i][j] = 'S';
k[1+3*t+2][i][j] = 'S';
} else if (ov == 1) {
k[1+3*t][i][j] = 'V';
k[1+3*t+1][i][j] = 'L';
k[1+3*t+2][i][j] = 'S';
} else {
k[1+3*t][i][j] = 'V';
k[1+3*t+1][i][j] = 'V';
k[1+3*t+2][i][j] = 'L';
}
}
}
}
}
for (int ki = 0; ki < 40; ++ki) {
cerr << ki+1 << endl;
for (int i = 0; i < n; ++i) {
for (int j = 0; j < m; ++j) {
cout << k[ki][i][j];
}
cout << endl;
}
}
for (int ch = 1; ch <= h; ++ch) {
vector<int> out;
out.push_back(0);
int x = ch;
for (int t = 0; t < T; ++t) {
int ov = x % 3;
x /= 3;
out.push_back(1+3*t+ov);
}
cout << out.size() << " ";
for (int ki : out) cout << ki+1 << " ";
cout << endl;
}
}
Test details
Test 1
Group: 1
Verdict: ACCEPTED
| input |
|---|
| 100 100 40 40 11 38 24 5 31 40 10 17 33 1... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| VVVVVVVVVVVVVVVVVVVVVVVVVVVVVV... Truncated |
Error:
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...
Test 2
Group: 2
Verdict: ACCEPTED
| input |
|---|
| 100 100 200 200 71 185 86 113 84 170 60 17... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| VVVVVVVVVVVVVVVVVVVVVVVVVVVVVV... Truncated |
Error:
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...
Test 3
Group: 3
Verdict: ACCEPTED
| input |
|---|
| 100 100 1000 824 172 828 721 509 73 437 530... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| VVVVVVVVVVVVVVVVVVVVVVVVVVVVVV... Truncated |
Error:
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...
Test 4
Group: 4
Verdict: ACCEPTED
| input |
|---|
| 100 100 10000 7110 9439 3392 1630 368 8481 1... |
| correct output |
|---|
| (empty) |
| user output |
|---|
| VVVVVVVVVVVVVVVVVVVVVVVVVVVVVV... Truncated |
Error:
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...
