| Task: | Wario Kart II |
| Sender: | aalto26cw_003 |
| Submission time: | 2026-09-16 17:49:38 +0300 |
| Language: | C++ (C++20) |
| Status: | READY |
| Result: | WRONG ANSWER |
| test | verdict | time | |
|---|---|---|---|
| #1 | WRONG ANSWER | 0.00 s | details |
| #2 | WRONG ANSWER | 0.00 s | details |
| #3 | WRONG ANSWER | 0.00 s | details |
| #4 | WRONG ANSWER | 0.00 s | details |
| #5 | WRONG ANSWER | 0.00 s | details |
| #6 | WRONG ANSWER | 0.00 s | details |
| #7 | WRONG ANSWER | 0.00 s | details |
| #8 | WRONG ANSWER | 0.00 s | details |
| #9 | WRONG ANSWER | 0.00 s | details |
| #10 | WRONG ANSWER | 0.00 s | details |
| #11 | WRONG ANSWER | 0.00 s | details |
| #12 | WRONG ANSWER | 0.00 s | details |
| #13 | WRONG ANSWER | 0.00 s | details |
| #14 | WRONG ANSWER | 0.00 s | details |
| #15 | WRONG ANSWER | 0.00 s | details |
| #16 | WRONG ANSWER | 0.00 s | details |
| #17 | WRONG ANSWER | 0.00 s | details |
| #18 | WRONG ANSWER | 0.00 s | details |
| #19 | WRONG ANSWER | 0.00 s | details |
| #20 | WRONG ANSWER | 0.00 s | details |
| #21 | WRONG ANSWER | 0.00 s | details |
| #22 | WRONG ANSWER | 0.00 s | details |
| #23 | WRONG ANSWER | 0.00 s | details |
| #24 | WRONG ANSWER | 0.00 s | details |
| #25 | WRONG ANSWER | 0.00 s | details |
| #26 | WRONG ANSWER | 0.00 s | details |
| #27 | WRONG ANSWER | 0.00 s | details |
| #28 | WRONG ANSWER | 0.00 s | details |
| #29 | WRONG ANSWER | 0.00 s | details |
| #30 | WRONG ANSWER | 0.00 s | details |
| #31 | WRONG ANSWER | 0.00 s | details |
| #32 | WRONG ANSWER | 0.00 s | details |
| #33 | WRONG ANSWER | 0.00 s | details |
| #34 | WRONG ANSWER | 0.00 s | details |
| #35 | WRONG ANSWER | 0.00 s | details |
| #36 | WRONG ANSWER | 0.00 s | details |
| #37 | WRONG ANSWER | 0.00 s | details |
| #38 | WRONG ANSWER | 0.00 s | details |
| #39 | WRONG ANSWER | 0.00 s | details |
| #40 | WRONG ANSWER | 0.00 s | details |
| #41 | WRONG ANSWER | 0.00 s | details |
| #42 | WRONG ANSWER | 0.00 s | details |
| #43 | WRONG ANSWER | 0.00 s | details |
| #44 | WRONG ANSWER | 0.00 s | details |
| #45 | WRONG ANSWER | 0.00 s | details |
| #46 | WRONG ANSWER | 0.00 s | details |
| #47 | WRONG ANSWER | 0.00 s | details |
| #48 | WRONG ANSWER | 0.00 s | details |
| #49 | WRONG ANSWER | 0.00 s | details |
| #50 | WRONG ANSWER | 0.00 s | details |
| #51 | WRONG ANSWER | 0.00 s | details |
| #52 | WRONG ANSWER | 0.00 s | details |
| #53 | WRONG ANSWER | 0.00 s | details |
| #54 | WRONG ANSWER | 0.00 s | details |
| #55 | WRONG ANSWER | 0.00 s | details |
| #56 | WRONG ANSWER | 0.00 s | details |
| #57 | WRONG ANSWER | 0.00 s | details |
| #58 | WRONG ANSWER | 0.00 s | details |
| #59 | WRONG ANSWER | 0.00 s | details |
Compiler report
input/code.cpp: In function 'int main()':
input/code.cpp:45:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
45 | for (int j = 0; j < A.size(); ++j) {
| ~~^~~~~~~~~~
input/code.cpp: In instantiation of 'uint64_t distance(auto:18, auto:19) [with auto:18 = std::vector<unsigned int>; auto:19 = std::vector<unsigned int>; uint64_t = long unsigned int]':
input/code.cpp:44:32: required from here
input/code.cpp:14:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<unsigned int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
14 | for (int a = 1; a <= A.size(); ++a) {
| ~~^~~~~~~~~~~
input/code.cpp:15:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<unsigned int>::size_type' {aka 'long unsigned int'} [-Ws...Code
#include <iostream>
#include <vector>
#include <cstdint>
#include <numeric>
uint64_t add_one_if_unequal(auto &iter1, auto &iter2) {
if (*iter1 == iter2) return 0;
return 1;
}
uint64_t distance(auto A, auto B) {
std::vector<std::vector<int>> distances(A.size()+1, std::vector<int>(B.size()+1));
distances[0][0] = 0;
for (int a = 1; a <= A.size(); ++a) {
for (int b = 1; b <= B.size(); ++b) {
//if (a == 0 && b == 0) continue;
distances[a][b] = INT32_MAX;
if (b != 0) distances[a][b] = std::min(distances[a][b], distances[a][b-1]+1);
if (a != 0) distances[a][b] = std::min(distances[a][b], distances[a-1][b]+1);
if (a != 0 && b != 0) {
int cost = A[a] != B[b];
distances[a][b] = std::min(distances[a][b], distances[a-1][b-1] + cost);
}
}
}
return distances[A.size()][B.size()];
}
int main() {
std::string A, B;
std::cin >> A >> B;
std::vector<uint> A_vec, B_vec;
for (char a : A) {
A_vec.push_back(a-'0');
}
for (char b : B) {
B_vec.push_back(b-'0');
}
uint64_t min = UINT64_MAX;
for (int i = 0; i < 10; ++i) {
min = std::min(distance(A_vec, B_vec)+i, min);
for (int j = 0; j < A.size(); ++j) {
A_vec[j] = (A_vec[j] + 1) % 10;
}
}
std::cout << min;
}Test details
Test 1
Verdict: WRONG ANSWER
| input |
|---|
| 1 5 3 |
| correct output |
|---|
| 0.33333333333333333334 |
| user output |
|---|
| 0 |
Test 2
Verdict: WRONG ANSWER
| input |
|---|
| 2 5 3 4 |
| correct output |
|---|
| 0.66666666666666666668 |
| user output |
|---|
| 0 |
Test 3
Verdict: WRONG ANSWER
| input |
|---|
| 2 5 2 2 |
| correct output |
|---|
| 1.00000000000000000000 |
| user output |
|---|
| 0 |
Test 4
Verdict: WRONG ANSWER
| input |
|---|
| 3 5 2 2 2 |
| correct output |
|---|
| 2.00000000000000000000 |
| user output |
|---|
| 0 |
Test 5
Verdict: WRONG ANSWER
| input |
|---|
| 3 5 3 4 3 |
| correct output |
|---|
| 1.00000000000000000000 |
| user output |
|---|
| 0 |
Test 6
Verdict: WRONG ANSWER
| input |
|---|
| 3 5 2 2 2 |
| correct output |
|---|
| 2.00000000000000000000 |
| user output |
|---|
| 0 |
Test 7
Verdict: WRONG ANSWER
| input |
|---|
| 4 5 3 4 3 4 |
| correct output |
|---|
| 1.75000000000000000000 |
| user output |
|---|
| 0 |
Test 8
Verdict: WRONG ANSWER
| input |
|---|
| 4 5 2 2 2 4 |
| correct output |
|---|
| 3.00000000000000000000 |
| user output |
|---|
| 0 |
Test 9
Verdict: WRONG ANSWER
| input |
|---|
| 4 3 2 2 2 2 |
| correct output |
|---|
| 3.00000000000000000000 |
| user output |
|---|
| 0 |
Test 10
Verdict: WRONG ANSWER
| input |
|---|
| 5 5 3 4 3 4 3 |
| correct output |
|---|
| 2.00000000000000000000 |
| user output |
|---|
| 0 |
Test 11
Verdict: WRONG ANSWER
| input |
|---|
| 5 5 2 2 2 4 2 |
| correct output |
|---|
| 3.50000000000000000000 |
| user output |
|---|
| 0 |
Test 12
Verdict: WRONG ANSWER
| input |
|---|
| 5 5 2 2 2 2 2 |
| correct output |
|---|
| 4.00000000000000000000 |
| user output |
|---|
| 0 |
Test 13
Verdict: WRONG ANSWER
| input |
|---|
| 5 5 2 2 3 3 4 |
| correct output |
|---|
| 3.00000000000000000000 |
| user output |
|---|
| 0 |
Test 14
Verdict: WRONG ANSWER
| input |
|---|
| 5 1 4 4 4 3 4 |
| correct output |
|---|
| 2.00000000000000000000 |
| user output |
|---|
| 0 |
Test 15
Verdict: WRONG ANSWER
| input |
|---|
| 5 4 2 3 5 5 3 |
| correct output |
|---|
| 2.59999999999999999991 |
| user output |
|---|
| 0 |
Test 16
Verdict: WRONG ANSWER
| input |
|---|
| 5 1 3 2 2 2 2 |
| correct output |
|---|
| 2.50000000000000000000 |
| user output |
|---|
| 0 |
Test 17
Verdict: WRONG ANSWER
| input |
|---|
| 5 1 3 5 4 3 5 |
| correct output |
|---|
| 1.79999999999999999996 |
| user output |
|---|
| 0 |
Test 18
Verdict: WRONG ANSWER
| input |
|---|
| 5 1 5 3 4 5 2 |
| correct output |
|---|
| 1.00000000000000000000 |
| user output |
|---|
| 0 |
Test 19
Verdict: WRONG ANSWER
| input |
|---|
| 5 2 3 2 2 2 2 |
| correct output |
|---|
| 3.00000000000000000000 |
| user output |
|---|
| 0 |
Test 20
Verdict: WRONG ANSWER
| input |
|---|
| 10 5 3 4 3 4 3 3 3 3 3 2 |
| correct output |
|---|
| 6.66666666666666666652 |
| user output |
|---|
| 0 |
Test 21
Verdict: WRONG ANSWER
| input |
|---|
| 10 5 2 2 2 4 2 2 2 3 2 3 |
| correct output |
|---|
| 7.00000000000000000000 |
| user output |
|---|
| 0 |
Test 22
Verdict: WRONG ANSWER
| input |
|---|
| 10 5 2 2 2 2 2 2 2 2 2 2 |
| correct output |
|---|
| 8.00000000000000000000 |
| user output |
|---|
| 0 |
Test 23
Verdict: WRONG ANSWER
| input |
|---|
| 10 5 2 2 3 3 4 3 4 2 2 2 |
| correct output |
|---|
| 7.00000000000000000000 |
| user output |
|---|
| 0 |
Test 24
Verdict: WRONG ANSWER
| input |
|---|
| 10 1 4 4 4 3 4 3 2 2 4 2 |
| correct output |
|---|
| 4.50000000000000000000 |
| user output |
|---|
| 0 |
Test 25
Verdict: WRONG ANSWER
| input |
|---|
| 10 4 2 3 5 5 3 2 4 3 5 3 |
| correct output |
|---|
| 6.00000000000000000000 |
| user output |
|---|
| 0 |
Test 26
Verdict: WRONG ANSWER
| input |
|---|
| 10 1 3 2 2 2 2 3 3 2 3 3 |
| correct output |
|---|
| 5.33333333333333333348 |
| user output |
|---|
| 0 |
Test 27
Verdict: WRONG ANSWER
| input |
|---|
| 10 1 3 5 4 3 5 3 4 3 4 2 |
| correct output |
|---|
| 4.00000000000000000000 |
| user output |
|---|
| 0 |
Test 28
Verdict: WRONG ANSWER
| input |
|---|
| 10 1 5 3 4 5 2 3 2 4 3 5 |
| correct output |
|---|
| 3.75000000000000000000 |
| user output |
|---|
| 0 |
Test 29
Verdict: WRONG ANSWER
| input |
|---|
| 10 2 3 2 2 2 2 2 2 4 3 2 |
| correct output |
|---|
| 5.75000000000000000000 |
| user output |
|---|
| 0 |
Test 30
Verdict: WRONG ANSWER
| input |
|---|
| 100 72 51 37 52 34 51 26 38 40 24 27 ... |
| correct output |
|---|
| 42.00000000000000000000 |
| user output |
|---|
| 1 |
Test 31
Verdict: WRONG ANSWER
| input |
|---|
| 100 72 94 2 14 31 100 16 25 11 41 20 ... |
| correct output |
|---|
| 4.96000000000000000003 |
| user output |
|---|
| 1 |
Test 32
Verdict: WRONG ANSWER
| input |
|---|
| 100 2 19 12 20 10 11 9 8 8 4 5 15 13... |
| correct output |
|---|
| 18.70588235294117647120 |
| user output |
|---|
| 0 |
Test 33
Verdict: WRONG ANSWER
| input |
|---|
| 100 71 8 4 2 6 6 9 5 9 2 3 2 3 3 2 2 ... |
| correct output |
|---|
| 85.00000000000000000000 |
| user output |
|---|
| 1 |
Test 34
Verdict: WRONG ANSWER
| input |
|---|
| 100 55 17 89 79 66 56 64 55 21 14 89 ... |
| correct output |
|---|
| 12.00000000000000000000 |
| user output |
|---|
| 1 |
Test 35
Verdict: WRONG ANSWER
| input |
|---|
| 100 87 6 3 4 7 7 4 2 5 4 6 4 5 4 3 7 ... |
| correct output |
|---|
| 90.00000000000000000000 |
| user output |
|---|
| 1 |
Test 36
Verdict: WRONG ANSWER
| input |
|---|
| 100 33 21 79 8 5 36 12 94 57 11 51 59... |
| correct output |
|---|
| 7.00000000000000000000 |
| user output |
|---|
| 1 |
Test 37
Verdict: WRONG ANSWER
| input |
|---|
| 100 78 9 12 24 18 12 24 9 14 8 13 3 3... |
| correct output |
|---|
| 77.00000000000000000000 |
| user output |
|---|
| 1 |
Test 38
Verdict: WRONG ANSWER
| input |
|---|
| 100 97 2 3 2 3 3 2 2 2 3 2 3 2 2 3 3 ... |
| correct output |
|---|
| 98.00000000000000000000 |
| user output |
|---|
| 1 |
Test 39
Verdict: WRONG ANSWER
| input |
|---|
| 100 50 20 20 2 6 13 7 2 10 34 17 7 11... |
| correct output |
|---|
| 52.96666666666666666713 |
| user output |
|---|
| 0 |
Test 40
Verdict: WRONG ANSWER
| input |
|---|
| 200 72 51 37 52 34 51 26 38 40 24 27 ... |
| correct output |
|---|
| 89.00000000000000000000 |
| user output |
|---|
| 1 |
Test 41
Verdict: WRONG ANSWER
| input |
|---|
| 200 72 94 2 14 31 100 16 25 11 41 20 ... |
| correct output |
|---|
| 73.91891891891891892136 |
| user output |
|---|
| 1 |
Test 42
Verdict: WRONG ANSWER
| input |
|---|
| 200 2 19 12 20 10 11 9 8 8 4 5 15 13... |
| correct output |
|---|
| 36.90000000000000000139 |
| user output |
|---|
| 0 |
Test 43
Verdict: WRONG ANSWER
| input |
|---|
| 200 71 8 4 2 6 6 9 5 9 2 3 2 3 3 2 2 ... |
| correct output |
|---|
| 177.00000000000000000000 |
| user output |
|---|
| 1 |
Test 44
Verdict: WRONG ANSWER
| input |
|---|
| 200 55 17 89 79 66 56 64 55 21 14 89 ... |
| correct output |
|---|
| 58.62790697674418604821 |
| user output |
|---|
| 1 |
Test 45
Verdict: WRONG ANSWER
| input |
|---|
| 200 87 6 3 4 7 7 4 2 5 4 6 4 5 4 3 7 ... |
| correct output |
|---|
| 184.00000000000000000000 |
| user output |
|---|
| 1 |
Test 46
Verdict: WRONG ANSWER
| input |
|---|
| 200 33 21 79 8 5 36 12 94 57 11 51 59... |
| correct output |
|---|
| 39.97647058823529411797 |
| user output |
|---|
| 1 |
Test 47
Verdict: WRONG ANSWER
| input |
|---|
| 1000 78 9 12 24 18 12 24 9 14 8 13 3 3... |
| correct output |
|---|
| 778.00000000000000000000 |
| user output |
|---|
| 1 |
Test 48
Verdict: WRONG ANSWER
| input |
|---|
| 1000 97 2 3 2 3 3 2 2 2 3 2 3 2 2 3 3 ... |
| correct output |
|---|
| 980.00000000000000000000 |
| user output |
|---|
| 1 |
Test 49
Verdict: WRONG ANSWER
| input |
|---|
| 10000 50 20 20 2 6 13 7 2 10 34 17 7 11... |
| correct output |
|---|
| 6049.00000000000000000000 |
| user output |
|---|
| 0 |
Test 50
Verdict: WRONG ANSWER
| input |
|---|
| 100000 59 39252 46336 33082 47087 29905 ... |
| correct output |
|---|
| 64.97006295772838237179 |
| user output |
|---|
| 2 |
Test 51
Verdict: WRONG ANSWER
| input |
|---|
| 100000 100 30041 38891 6 5345 12609 41664... |
| correct output |
|---|
| 203.77740406665647454609 |
| user output |
|---|
| 1 |
Test 52
Verdict: WRONG ANSWER
| input |
|---|
| 100000 18 1132 40617 23967 41323 18982 2... |
| correct output |
|---|
| 40.94677609727978918885 |
| user output |
|---|
| 2 |
Test 53
Verdict: WRONG ANSWER
| input |
|---|
| 100000 7 39007 46266 16025 6684 28138 3... |
| correct output |
|---|
| 14.93255621844882973827 |
| user output |
|---|
| 1 |
Test 54
Verdict: WRONG ANSWER
| input |
|---|
| 100000 90 52921 16702 94063 82743 69126 ... |
| correct output |
|---|
| 91.66979787325027796002 |
| user output |
|---|
| 1 |
Test 55
Verdict: WRONG ANSWER
| input |
|---|
| 100000 5 19332 18457 4591 8077 20395 21... |
| correct output |
|---|
| 35.88927530302255408320 |
| user output |
|---|
| 1 |
Test 56
Verdict: WRONG ANSWER
| input |
|---|
| 100000 95 29643 18699 73326 5739 3724 33... |
| correct output |
|---|
| 96.91999685748703713406 |
| user output |
|---|
| 2 |
Test 57
Verdict: WRONG ANSWER
| input |
|---|
| 100000 22 5953 2436 3347 7466 5522 3478 ... |
| correct output |
|---|
| 330.93907248742010063225 |
| user output |
|---|
| 2 |
Test 58
Verdict: WRONG ANSWER
| input |
|---|
| 100000 1 84598 20915 75920 32975 46369 ... |
| correct output |
|---|
| 2.81955087271179225200 |
| user output |
|---|
| 1 |
Test 59
Verdict: WRONG ANSWER
| input |
|---|
| 100000 36 522 520 516 9 140 330 149 15 2... |
| correct output |
|---|
| 3870.97771317829457360382 |
| user output |
|---|
| 2 |
