18382022-12-04 18:57:07peterKvázi-Izogramcpp17Wrong answer 30/10071ms5948 KiB
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

int main()
{
    int mondatokszama;
    scanf("%d\n", &mondatokszama);
    char** mondat = (char**)malloc(sizeof(char*) * mondatokszama);
    for (int i = 0; i < mondatokszama; i++)
    {
        mondat[i] = (char*)malloc(sizeof(char) * 101);
        fgets(mondat[i], 101, stdin);
    }

    int isogram = mondatokszama;
    for (int i = 0; i < mondatokszama; i++)
    {
        for (int j = 0; j < strlen(mondat[i]) - 1; j++)
        {
            int db = 1;
            for (int k = j + 1; k < strlen(mondat[i]); k++)
            {
                
                if (tolower(mondat[i][j]) == tolower(mondat[i][k]) && (mondat[i][j] > 'A' && mondat[i][j] < 'Z' || mondat[i][j] > 'a' && mondat[i][j] < 'z'))
                {
                    db++;
                }
            }
            if (db > 2)
            {
                isogram--;
            }
        }
    }

    printf("%d", isogram);


    free(mondat);

    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer3ms1220 KiB
2Accepted2ms1492 KiB
subtask230/30
3Accepted2ms1704 KiB
4Accepted2ms1840 KiB
5Accepted2ms2168 KiB
6Accepted2ms2296 KiB
7Accepted4ms4396 KiB
subtask30/50
8Wrong answer2ms2324 KiB
9Wrong answer2ms2576 KiB
10Wrong answer3ms2580 KiB
11Wrong answer2ms2660 KiB
12Wrong answer3ms2796 KiB
13Wrong answer3ms3060 KiB
subtask40/20
14Wrong answer6ms3184 KiB
15Wrong answer8ms3408 KiB
16Wrong answer16ms3768 KiB
17Wrong answer29ms4156 KiB
18Wrong answer50ms5064 KiB
19Wrong answer65ms5692 KiB
20Wrong answer71ms5948 KiB