6118 | 2023-11-01 21:51:07 | mmated | Kvázi-Izogram | cpp17 | Accepted 100/100 | 6ms | 6240 KiB |
#include <bits/stdc++.h>
using namespace std;
#define f(i,k,n) for(int i=k; i<n; i++)
#define ll long long
const int inf = INT_MAX;
void solve()
{
int n,c=0;
string s;
getline(cin,s);
n=stoi(s);
f(i,0,n)
{
int b=1;
int m[26]={0};
getline(cin,s);
//cout<<s<<"\n";
f(j,0,s.length()) if(s[j]!=' ') m[tolower(s[j])-'a']++;
f(j,0,26) if(m[j]>2) b=0;
c+=b;
}
cout<<c<<"\n";
}
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int t=1;
//cin>>t;
while(t--) solve();
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1824 KiB | ||||
2 | Accepted | 3ms | 2056 KiB | ||||
subtask2 | 30/30 | ||||||
3 | Accepted | 3ms | 2548 KiB | ||||
4 | Accepted | 3ms | 2560 KiB | ||||
5 | Accepted | 3ms | 2640 KiB | ||||
6 | Accepted | 3ms | 2796 KiB | ||||
7 | Accepted | 4ms | 3112 KiB | ||||
subtask3 | 50/50 | ||||||
8 | Accepted | 3ms | 3212 KiB | ||||
9 | Accepted | 3ms | 3452 KiB | ||||
10 | Accepted | 3ms | 3528 KiB | ||||
11 | Accepted | 3ms | 3784 KiB | ||||
12 | Accepted | 3ms | 3752 KiB | ||||
13 | Accepted | 3ms | 3780 KiB | ||||
subtask4 | 20/20 | ||||||
14 | Accepted | 3ms | 4124 KiB | ||||
15 | Accepted | 3ms | 4120 KiB | ||||
16 | Accepted | 3ms | 4304 KiB | ||||
17 | Accepted | 4ms | 4592 KiB | ||||
18 | Accepted | 4ms | 5060 KiB | ||||
19 | Accepted | 6ms | 5492 KiB | ||||
20 | Accepted | 6ms | 6240 KiB |