18362022-12-04 18:54:45peterKvázi-Izogramcpp17Wrong answer 30/10072ms5372 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')
                {
                    db++;
                }
            }
            if (db > 2)
            {
                isogram--;
            }
        }
    }

    printf("%d", isogram);


    free(mondat);

    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer3ms1364 KiB
2Accepted2ms1704 KiB
subtask230/30
3Accepted2ms1920 KiB
4Accepted2ms1860 KiB
5Accepted2ms2080 KiB
6Accepted2ms2328 KiB
7Accepted4ms4512 KiB
subtask30/50
8Wrong answer2ms2508 KiB
9Wrong answer2ms2360 KiB
10Wrong answer3ms2572 KiB
11Wrong answer3ms2624 KiB
12Wrong answer3ms2820 KiB
13Wrong answer3ms2964 KiB
subtask40/20
14Wrong answer6ms2964 KiB
15Wrong answer8ms2976 KiB
16Wrong answer16ms3224 KiB
17Wrong answer29ms3708 KiB
18Wrong answer52ms4440 KiB
19Wrong answer65ms5020 KiB
20Wrong answer72ms5372 KiB