18412022-12-04 18:59:32peterKvázi-Izogramcpp17Wrong answer 30/10072ms5992 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
1Accepted3ms1256 KiB
2Accepted2ms1760 KiB
subtask230/30
3Accepted2ms1700 KiB
4Accepted2ms1860 KiB
5Accepted2ms1952 KiB
6Accepted2ms2432 KiB
7Accepted4ms4716 KiB
subtask30/50
8Wrong answer2ms2804 KiB
9Wrong answer2ms2872 KiB
10Wrong answer2ms2988 KiB
11Wrong answer2ms3212 KiB
12Wrong answer3ms3220 KiB
13Wrong answer3ms3312 KiB
subtask40/20
14Wrong answer6ms3528 KiB
15Wrong answer8ms3672 KiB
16Wrong answer16ms3864 KiB
17Wrong answer29ms4348 KiB
18Wrong answer50ms5076 KiB
19Wrong answer64ms5572 KiB
20Wrong answer72ms5992 KiB