113792024-08-29 13:06:48MCDaveKvázi-Izogramcpp17Wrong answer 30/10019ms1008 KiB
#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <cctype>

using namespace std;

int main()
{
    int n, i, j, out;
    int abc[26] = { };
    int x = sizeof(abc);
    string text;

    cin >> n;
    out = n;
    cin.ignore();

    for (i = 0; i < n; i++)
    {
        getline(cin, text);
        memset(abc, 0, x);
        for (j = 0; j < text.length(); j++)
        {
            text[j] = tolower(text[j]);
            if (int(text[j]) != 32)
            {
                abc[int(text[j])-97]++;
            }
        }
        for (j = 0; j < 26; j++)
        {
            if (abc[j] > 2)
            {
                out--;
            }
        }
    }

    cout << out;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted2ms360 KiB
2Accepted3ms504 KiB
subtask230/30
3Accepted3ms420 KiB
4Accepted3ms400 KiB
5Accepted3ms420 KiB
6Accepted3ms400 KiB
7Accepted4ms360 KiB
subtask30/50
8Wrong answer3ms360 KiB
9Wrong answer3ms632 KiB
10Wrong answer3ms556 KiB
11Wrong answer3ms636 KiB
12Wrong answer3ms384 KiB
13Wrong answer3ms632 KiB
subtask40/20
14Wrong answer3ms504 KiB
15Wrong answer4ms624 KiB
16Wrong answer6ms488 KiB
17Wrong answer8ms544 KiB
18Wrong answer14ms928 KiB
19Wrong answer17ms1008 KiB
20Wrong answer19ms888 KiB