| Task: | Monikulmio |
| Sender: | PMak |
| Submission time: | 2025-10-27 08:52:12 +0200 |
| Language: | C++ (C++17) |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | WRONG ANSWER | 0 |
| test | verdict | time | score | |
|---|---|---|---|---|
| #1 | WRONG ANSWER | 0.01 s | 0 | details |
| #2 | RUNTIME ERROR | 0.01 s | 0 | details |
| #3 | RUNTIME ERROR | 0.01 s | 0 | details |
| #4 | RUNTIME ERROR | 0.01 s | 0 | details |
| #5 | RUNTIME ERROR | 0.01 s | 0 | details |
| #6 | RUNTIME ERROR | 0.01 s | 0 | details |
| #7 | RUNTIME ERROR | 0.01 s | 0 | details |
| #8 | RUNTIME ERROR | 0.01 s | 0 | details |
| #9 | RUNTIME ERROR | 0.01 s | 0 | details |
| #10 | WRONG ANSWER | 0.01 s | 0 | details |
Compiler report
input/code.cpp:22:19: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
22 | void print(vector<auto> v) {
| ^~~~Code
#include <bits/stdc++.h>
#define F0R(n) for (int i=0; i<n; i++)
#define FOR(from, to) for (int i = from; i < to; i++)
#define R0F(n) for (int i = n; i>=0; --i)
#define ROF(from, to) for (int i = from; i >= to; --i)
#define ll long long
#define mod (int) (1e9 + 7)
#define vi vector<int>
#define vll vector<ll>
#define vc vector<char>
#define pii pair<int, int>
#define pci pair<char, int>
#define pll pair<ll, ll>
#define YES cout << "YES\n";
#define NO cout << "NO\n";
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
using namespace std;
void print(vector<auto> v) {
for (auto it = v.begin(); it != v.end(); ++it)
cout << *it << " ";
cout << "\n";
}
vector<vi> adj(int(1e5+1), vi());
vi vis(int(1e5+1));
void soln() {
int n, m, k;
cin >> n >> m >> k;
vector <vector<char>> grid (n, vector<char>(m, '.'));
int first = 0;
pii prev = {0, 0};
pii initial = {0, 0};
int a, b;
int down, left;
F0R (k) {
cin >> a >> b;
--a; --b;
grid[b][a] = '*';
if (first == 0) {
initial = {a, b};
prev = {a, b};
first = 1;
continue;
}
if (a > prev.first) left = 1;
else if (a < prev.first) left = -1;
else left = 0;
if (b > prev.second) down = 1;
else if (b < prev.second) down = -1;
else down = 0;
if (down == 0 && left == 0) {
}
else if (down == 0 && left != 0) {
for (int j = min(a, prev.first)+1; j<max(a, prev.first); ++j)
grid[b][j] = '=';
}
else if (down != 0 && left == 0) {
for (int j = min(b, prev.second)+1; j<max(b, prev.second); ++j)
grid[j][a] = '|';
}
else if (down == left) {
int x = min(a, prev.second)+1, y = min(b, prev.second)+1;
for ( ; x < max(a, prev.second) && y < max(b, prev.second); ++y, ++x) {
grid[y][x] = '\\';
}
}
else if (down != left) {
int y = min(a, prev.second)+1, x = min(b, prev.second)+1;
for ( ; y < max(a, prev.second) && x < max(b, prev.second); ++y, ++x) {
grid[y][x] = '/';
}
}
prev = {a, b};
}
a = initial.first; b = initial.second;
if (a > prev.first) left = 1;
else if (a < prev.first) left = -1;
else left = 0;
if (b > prev.second) down = 1;
else if (b < prev.second) down = -1;
else down = 0;
if (down == 0 && left == 0) {
}
else if (down == 0 && left != 0) {
for (int j = min(a, prev.first)+1; j<max(a, prev.first); ++j)
grid[b][j] = '=';
}
else if (down != 0 && left == 0) {
for (int j = min(b, prev.second)+1; j<max(b, prev.second); ++j)
grid[j][a] = '|';
}
else if (down == left) {
int x = min(a, prev.second)+1, y = min(b, prev.second)+1;
for ( ; x < max(a, prev.second) && y < max(b, prev.second); ++y, ++x) {
grid[y][x] = '\\';
}
}
else if (down != left) {
int y = min(a, prev.second)+1, x = min(b, prev.second)+1;
for ( ; y < max(a, prev.second) && x < max(b, prev.second); ++y, ++x) {
grid[y][x] = '/';
}
}
for (auto v : grid)
print(v);
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int tc=1;
//cin >> tc;
while (tc--) soln();
return 0;
}
Test details
Test 1 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 8 9 5 5 2 2 5 5 8 7 8 ... |
| correct output |
|---|
| ......... ....*.... .../#\... ../###\.. .*#####*. ... |
| user output |
|---|
| . . . . . . . . . . . . . * = * . . . . . . . . | . . . . . . . . | . . . * . . . . | . . ... |
Feedback: Incorrect length on line 1: expected 9, got 1
Test 2 (public)
Verdict: RUNTIME ERROR
| input |
|---|
| 20 40 4 5 10 5 30 15 30 15 10 |
| correct output |
|---|
| ................................. |
| user output |
|---|
| (empty) |
Test 3 (public)
Verdict: RUNTIME ERROR
| input |
|---|
| 20 40 29 8 7 13 2 14 2 9 7 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| (empty) |
Test 4 (public)
Verdict: RUNTIME ERROR
| input |
|---|
| 20 40 14 5 12 5 25 8 28 13 28 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| (empty) |
Test 5 (public)
Verdict: RUNTIME ERROR
| input |
|---|
| 20 40 12 3 20 7 16 7 9 11 13 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| (empty) |
Test 6 (public)
Verdict: RUNTIME ERROR
| input |
|---|
| 9 35 33 2 3 2 8 4 8 4 5 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| (empty) |
Test 7 (public)
Verdict: RUNTIME ERROR
| input |
|---|
| 30 100 69 6 10 6 14 7 14 7 18 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| (empty) |
Test 8 (public)
Verdict: RUNTIME ERROR
| input |
|---|
| 40 60 192 11 3 11 5 10 6 11 7 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
| (empty) |
Test 9 (public)
Verdict: RUNTIME ERROR
| input |
|---|
| 50 100 142 1 1 1 7 1 11 1 14 ... |
| correct output |
|---|
| *=====*===*==*................... |
| user output |
|---|
| (empty) |
Test 10 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 100 100 1000 10 1 4 7 1 4 1 9 ... |
| correct output |
|---|
| ...*====*........................ |
| user output |
|---|
| . . . . . . . . . * * . . . . ... |
Feedback: Incorrect length on line 1: expected 100, got 1
