113802024-08-29 13:16:15MCDaveKvázi-Izogramcpp17Accepted 100/10017ms760 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]);
            abc[int(text[j])-97]++;
        }
        for (j = 0; j < 26; j++)
        {
            if (abc[j] > 2)
            {
                out--;
                break;
            }
        }
    }

    cout << out;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted2ms360 KiB
2Accepted3ms384 KiB
subtask230/30
3Accepted3ms512 KiB
4Accepted3ms384 KiB
5Accepted3ms376 KiB
6Accepted3ms408 KiB
7Accepted4ms360 KiB
subtask350/50
8Accepted3ms360 KiB
9Accepted3ms488 KiB
10Accepted3ms504 KiB
11Accepted3ms256 KiB
12Accepted3ms360 KiB
13Accepted3ms360 KiB
subtask420/20
14Accepted3ms376 KiB
15Accepted4ms760 KiB
16Accepted6ms384 KiB
17Accepted8ms528 KiB
18Accepted14ms408 KiB
19Accepted17ms376 KiB
20Accepted17ms488 KiB