6268 | 2023-11-10 20:29:19 | horka | Kvázi-Izogram | cpp17 | Runtime error 80/100 | 4ms | 4368 KiB |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,cnt=0; cin>>n;
for(int i=0; i<=n; i++)
{
vector<int> v(26);
bool van=true;
string s;
getline(cin,s);
for(char c:s)
c!=' ' && isupper(c) ? v[c-'A']++ : v[c-'a']++;
for(int j:v)
if(j>2) van=false;
cnt+=van;
}
cout<<cnt-1<<endl;
/*string s;
getline(cin,s);
cout<<s.size()<<endl;*/
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1812 KiB | ||||
2 | Accepted | 3ms | 2004 KiB | ||||
subtask2 | 30/30 | ||||||
3 | Accepted | 3ms | 2260 KiB | ||||
4 | Accepted | 3ms | 2464 KiB | ||||
5 | Accepted | 3ms | 2676 KiB | ||||
6 | Accepted | 3ms | 2884 KiB | ||||
7 | Accepted | 4ms | 3032 KiB | ||||
subtask3 | 50/50 | ||||||
8 | Accepted | 3ms | 3220 KiB | ||||
9 | Accepted | 3ms | 3428 KiB | ||||
10 | Accepted | 3ms | 3480 KiB | ||||
11 | Accepted | 3ms | 3604 KiB | ||||
12 | Accepted | 3ms | 3708 KiB | ||||
13 | Accepted | 3ms | 3916 KiB | ||||
subtask4 | 0/20 | ||||||
14 | Runtime error | 3ms | 3972 KiB | ||||
15 | Runtime error | 3ms | 3856 KiB | ||||
16 | Runtime error | 3ms | 3856 KiB | ||||
17 | Runtime error | 3ms | 3988 KiB | ||||
18 | Runtime error | 3ms | 4132 KiB | ||||
19 | Runtime error | 3ms | 4112 KiB | ||||
20 | Runtime error | 3ms | 4368 KiB |