| Task: | Monikulmio |
| Sender: | xheater |
| Submission time: | 2025-11-04 18:54:01 +0200 |
| Language: | C++ (C++17) |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | WRONG ANSWER | 0 |
| test | verdict | time | score | |
|---|---|---|---|---|
| #1 | WRONG ANSWER | 0.00 s | 0 | details |
| #2 | WRONG ANSWER | 0.00 s | 0 | details |
| #3 | WRONG ANSWER | 0.00 s | 0 | details |
| #4 | WRONG ANSWER | 0.00 s | 0 | details |
| #5 | WRONG ANSWER | 0.00 s | 0 | details |
| #6 | WRONG ANSWER | 0.00 s | 0 | details |
| #7 | WRONG ANSWER | 0.00 s | 0 | details |
| #8 | WRONG ANSWER | 0.00 s | 0 | details |
| #9 | WRONG ANSWER | 0.00 s | 0 | details |
| #10 | WRONG ANSWER | 0.00 s | 0 | details |
Code
#include <iostream>
#include <vector>
#include <array>
#include <unordered_set>
using namespace std;
// dir = 1 => row
// dir = 0 => collumn
class Operation{
public:
bool dir;
int number, color;
Operation(bool a, int b, int c) :
dir(a), number(b), color(c) {}
bool operator==(const Operation &a)const {
return (a.dir == dir && a.number == number);
}
};
struct Hash{
size_t operator()(const Operation& a) const{
return hash<int>()(a.number) ^ (hash<bool>()(a.dir) << 1);
}
};
int main(){
int n, m, k, q = 0;
vector<Operation> list = {};
cin >> n >> m >> k >> q;
list.reserve(q);
int colors[q] = {};
for(int i = 0; i < q; i++){
char dir;
int number, color;
cin >> dir >> number >> color;
list.emplace_back(Operation(dir == 'R', number, color));
}
int taken_row = 0;
int taken_column = 0;
unordered_set<Operation, Hash>found = {};
cout << char(10);
while (!list.empty()){
Operation last = list.back();
if (found.count(last) == 0){
cout << last.dir << " " << last.number << " " << last.color << char(10);
int amount = 0;
if(last.dir){
amount = m - taken_column;
taken_row++;
}else{
amount = n - taken_row;
taken_column++;
}
if (last.color -1 >= 0 && q >= last.color){
colors[last.color-1] = amount;
}
found.insert(last);
}
list.pop_back();
}
for(int i = 0; i < q; i++){
cout << colors[i] << " ";
}
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 |
|---|
0 7 2 0 8 7 0 2 5 0 8 0 0 8 |
Feedback: Incorrect length on line 1: expected 9, got 1
Test 2 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 20 40 4 5 10 5 30 15 30 15 10 |
| correct output |
|---|
| ................................. |
| user output |
|---|
0 0 15 0 0 0 0 0 |
Feedback: Incorrect length on line 1: expected 40, got 1
Test 3 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 20 40 29 8 7 13 2 14 2 9 7 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
0 7 16 0 5 13 0 2 10 0 17 10 ... |
Feedback: Incorrect length on line 1: expected 40, got 1
Test 4 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 20 40 14 5 12 5 25 8 28 13 28 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
0 5 16 0 8 16 0 2 5 0 0 0 0 20 |
Feedback: Incorrect length on line 1: expected 40, got 1
Test 5 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 20 40 12 3 20 7 16 7 9 11 13 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
0 11 13 0 6 7 0 0 7 0 0 0 |
Feedback: Incorrect length on line 1: expected 40, got 1
Test 6 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 9 35 33 2 3 2 8 4 8 4 5 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
0 8 4 0 2 8 0 0 |
Feedback: Incorrect length on line 1: expected 35, got 1
Test 7 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 30 100 69 6 10 6 14 7 14 7 18 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
0 0 12 0 8 8 0 4 7 0 0 0 0 0 0 |
Feedback: Incorrect length on line 1: expected 100, got 1
Test 8 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 40 60 192 11 3 11 5 10 6 11 7 ... |
| correct output |
|---|
| ................................. |
| user output |
|---|
0 4 11 0 5 10 0 3 9 0 2 9 ... |
Feedback: Incorrect length on line 1: expected 60, got 1
Test 9 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 50 100 142 1 1 1 7 1 11 1 14 ... |
| correct output |
|---|
| *=====*===*==*................... |
| user output |
|---|
0 1 7 0 |
Feedback: Incorrect length on line 1: expected 100, got 1
Test 10 (public)
Verdict: WRONG ANSWER
| input |
|---|
| 100 100 1000 10 1 4 7 1 4 1 9 ... |
| correct output |
|---|
| ...*====*........................ |
| user output |
|---|
0 2 2 0 5 2 0 1 5 0 8 5 ... |
Feedback: Incorrect length on line 1: expected 100, got 1
