11379 | 2024-08-29 13:06:48 | MCDave | Kvázi-Izogram | cpp17 | Wrong answer 30/100 | 19ms | 1008 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;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 2ms | 360 KiB | ||||
2 | Accepted | 3ms | 504 KiB | ||||
subtask2 | 30/30 | ||||||
3 | Accepted | 3ms | 420 KiB | ||||
4 | Accepted | 3ms | 400 KiB | ||||
5 | Accepted | 3ms | 420 KiB | ||||
6 | Accepted | 3ms | 400 KiB | ||||
7 | Accepted | 4ms | 360 KiB | ||||
subtask3 | 0/50 | ||||||
8 | Wrong answer | 3ms | 360 KiB | ||||
9 | Wrong answer | 3ms | 632 KiB | ||||
10 | Wrong answer | 3ms | 556 KiB | ||||
11 | Wrong answer | 3ms | 636 KiB | ||||
12 | Wrong answer | 3ms | 384 KiB | ||||
13 | Wrong answer | 3ms | 632 KiB | ||||
subtask4 | 0/20 | ||||||
14 | Wrong answer | 3ms | 504 KiB | ||||
15 | Wrong answer | 4ms | 624 KiB | ||||
16 | Wrong answer | 6ms | 488 KiB | ||||
17 | Wrong answer | 8ms | 544 KiB | ||||
18 | Wrong answer | 14ms | 928 KiB | ||||
19 | Wrong answer | 17ms | 1008 KiB | ||||
20 | Wrong answer | 19ms | 888 KiB |