| Task: | Palindromi |
| Sender: | EngiFish |
| Submission time: | 2025-10-28 18:02:53 +0200 |
| Language: | C++ (C++17) |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | WRONG ANSWER | 0 |
| 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 |
Compiler report
input/code.cpp: In function 'int main()':
input/code.cpp:16:20: warning: 'eri' may be used uninitialized in this function [-Wmaybe-uninitialized]
16 | cout << eri << "\n";
| ^~~~Code
#include <iostream>
using namespace std;
int main() {
string s;
int eri;
cin >> s;
int pituus = s.length();
for(int i = pituus-1; i >= pituus/2; i--){
if(s[pituus-i-1] != s[i]){
eri++;
}
}
cout << eri << "\n";
}Test details
Test 1 (public)
Verdict: WRONG ANSWER
| input |
|---|
| datatahti |
| correct output |
|---|
| 3 |
| user output |
|---|
| 4 |
Test 2 (public)
Verdict: WRONG ANSWER
| input |
|---|
| saippuakauppias |
| correct output |
|---|
| 0 |
| user output |
|---|
| 1 |
Test 3 (public)
Verdict: WRONG ANSWER
| input |
|---|
| a |
| correct output |
|---|
| 0 |
| user output |
|---|
| 1 |
Test 4 (public)
Verdict: WRONG ANSWER
| input |
|---|
| aa |
| correct output |
|---|
| 0 |
| user output |
|---|
| 1 |
Test 5 (public)
Verdict: WRONG ANSWER
| input |
|---|
| abc |
| correct output |
|---|
| 1 |
| user output |
|---|
| 2 |
Test 6 (public)
Verdict: WRONG ANSWER
| input |
|---|
| aybabtu |
| correct output |
|---|
| 2 |
| user output |
|---|
| 3 |
Test 7 (public)
Verdict: WRONG ANSWER
| input |
|---|
| abacabaca |
| correct output |
|---|
| 2 |
| user output |
|---|
| 3 |
Test 8 (public)
Verdict: WRONG ANSWER
| input |
|---|
| bbbbaaaababbbbbaabaaabaaaaabab... |
| correct output |
|---|
| 23 |
| user output |
|---|
| 24 |
Test 9 (public)
Verdict: WRONG ANSWER
| input |
|---|
| acbaaabaabaddaccdcccbcdbdddacd... |
| correct output |
|---|
| 38 |
| user output |
|---|
| 39 |
Test 10 (public)
Verdict: WRONG ANSWER
| input |
|---|
| uaqtmfftecryanvpshxsodjrllqnqp... |
| correct output |
|---|
| 49 |
| user output |
|---|
| 50 |
