| Task: | Monikulmio |
| Sender: | Mariia |
| Submission time: | 2025-10-27 08:20:08 +0200 |
| Language: | C++ (C++20) |
| Status: | READY |
| Result: | 35 |
| group | verdict | score |
|---|---|---|
| #1 | RUNTIME ERROR | 35 |
| test | verdict | time | score | |
|---|---|---|---|---|
| #1 | ACCEPTED | 0.00 s | 7 | details |
| #2 | ACCEPTED | 0.00 s | 7 | details |
| #3 | RUNTIME ERROR | 0.00 s | 0 | details |
| #4 | WRONG ANSWER | 0.00 s | 0 | details |
| #5 | WRONG ANSWER | 0.00 s | 0 | details |
| #6 | ACCEPTED | 0.00 s | 7 | details |
| #7 | WRONG ANSWER | 0.00 s | 0 | details |
| #8 | ACCEPTED | 0.00 s | 7 | details |
| #9 | ACCEPTED | 0.00 s | 7 | details |
| #10 | WRONG ANSWER | 0.00 s | 0 | details |
Code
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, m, k;
cin >> n >> m >> k;
vector<vector<char>> t(n, vector<char> (m, '.'));
vector<pair<int, int>> points;
for (int i = 0; i < k; i++) {
int y, x;
cin >> y >> x;
y--; x--;
t[y][x] = '*';
points.push_back({y, x});
}
points.push_back(points[0]);
for (int i = 1; i <= k; i++) {
int y0 = points[i - 1].first;
int x0 = points[i - 1].second;
int y1 = points[i].first;
int x1 = points[i].second;
if (y1 == y0) {
for (int j = min(x0, x1) + 1; j < max(x0, x1); j++) {
t[y0][j] = '=';
}
} else if (x1 == x0) {
for (int j = min(y0, y1) + 1; j < max(y0, y1); j++) {
t[j][x0] = '|';
}
} else if (y0 > y1) {
int dif = y0 - y1;
for (int j = 1; j < dif; j++) {
t[y0 - j][x0 + j] = '/';
}
} else if (y0 < y1) {
int dif = y1 - y0;
for (int j = 1; j < dif; j++) {
t[y0 + j][x0 + j] = '\\';
}
}
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cout << t[i][j];
}
cout << '\n';
}
}
Test details
Test 1 (public)
Verdict: ACCEPTED
| input |
|---|
| 8 9 5 5 2 2 5 5 8 7 8 ... |
| correct output |
|---|
| ......... ....*.... .../#\... ../###\.. .*#####*. ... |
| user output |
|---|
| ......... ....*.... .../.\... ../...\.. .*.....*. ... |
Feedback: Lines are drawn correctly. Incorrect fill character on row 3, col 5: expected '#', got '.'
Test 2 (public)
Verdict: ACCEPTED
| input |
|---|
| 20 40 4 5 10 5 30 15 30 15 10 |
| correct output |
|---|
| ................................. |
| user output |
|---|
| ................................. |
Feedback: Lines are drawn correctly. Incorrect fill character on row 6, col 11: expected '#', got '.'
Test 3 (public)
Verdict: RUNTIME ERROR
| input |
|---|
| 20 40 29 8 7 13 2 14 2 9 7 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| (empty) |
Error:
double free or corruption (out)
Test 4 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 20 40 14 5 12 5 25 8 28 13 28 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| ................................. |
Feedback: Incorrect character on row 4, col 27: expected '\', got '.'
Test 5 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 20 40 12 3 20 7 16 7 9 11 13 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| ................................. |
Feedback: Incorrect character on row 4, col 19: expected '/', got '.'
Test 6 (public)
Verdict: ACCEPTED
| input |
|---|
| 9 35 33 2 3 2 8 4 8 4 5 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| ................................. |
Feedback: Lines are drawn correctly. Incorrect fill character on row 3, col 3: expected '#', got '.'
Test 7 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 30 100 69 6 10 6 14 7 14 7 18 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| ................................. |
Feedback: Incorrect character on row 10, col 8: expected '\', got '.'
Test 8 (public)
Verdict: ACCEPTED
| input |
|---|
| 40 60 192 11 3 11 5 10 6 11 7 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| ................................. |
Feedback: Lines are drawn correctly. Incorrect fill character on row 3, col 30: expected '#', got '.'
Test 9 (public)
Verdict: ACCEPTED
| input |
|---|
| 50 100 142 1 1 1 7 1 11 1 14 ... |
| correct output |
|---|
| *=====*===*==*................... |
| user output |
|---|
| *=====*===*==*................... |
Feedback: Lines are drawn correctly. Incorrect fill character on row 2, col 11: expected '#', got '.'
Test 10 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 100 100 1000 10 1 4 7 1 4 1 9 ... |
| correct output |
|---|
| ...*====*........................ |
| user output |
|---|
| ...*====*........................ |
Feedback: Incorrect character on row 2, col 5: expected '\', got '.'
