Task: | Sanalista |
Sender: | Tobdu |
Submission time: | 2020-09-29 20:39:54 +0300 |
Language: | C++ (C++17) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
test | verdict | time | |
---|---|---|---|
#1 | WRONG ANSWER | 0.01 s | details |
#2 | WRONG ANSWER | 0.01 s | details |
#3 | WRONG ANSWER | 0.01 s | details |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:18:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int j=0; j<current_word.length(); j++) { ~^~~~~~~~~~~~~~~~~~~~~~ input/code.cpp:22:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int k=j++; k<current_word.length(); k++) { ~^~~~~~~~~~~~~~~~~~~~~~
Code
#include <iostream> #include <string> using namespace std; int main() { int words_amount; int wweaol = 0; cin >> words_amount; for (int i=0; i<words_amount; i++) { string current_word; cin >> current_word; bool even_amount = false; if (current_word.length() % 2 == 0) { for (int j=0; j<current_word.length(); j++) { char current_character = current_word[j]; int chars_found = 0; for (int k=j++; k<current_word.length(); k++) { if (current_word[k] == current_character) { chars_found++; } } if (chars_found % 2 == 0) { even_amount = true; } } if (even_amount) { wweaol++; } } } cout << wweaol << endl; }
Test details
Test 1
Verdict: WRONG ANSWER
input |
---|
1000 korvata sopimusaika nuhatartunta korttiautomaatti ... |
correct output |
---|
15 |
user output |
---|
363 |
Test 2
Verdict: WRONG ANSWER
input |
---|
1000 pub hansikaslokero erikoisvalmisteinen unijukka ... |
correct output |
---|
42 |
user output |
---|
362 |
Test 3
Verdict: WRONG ANSWER
input |
---|
1000 haapalastu toipumisaika mustalaiskieli taidelainaamo ... |
correct output |
---|
70 |
user output |
---|
413 |