61182023-11-01 21:51:07mmatedKvázi-Izogramcpp17Accepted 100/1006ms6240 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;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1824 KiB
2Accepted3ms2056 KiB
subtask230/30
3Accepted3ms2548 KiB
4Accepted3ms2560 KiB
5Accepted3ms2640 KiB
6Accepted3ms2796 KiB
7Accepted4ms3112 KiB
subtask350/50
8Accepted3ms3212 KiB
9Accepted3ms3452 KiB
10Accepted3ms3528 KiB
11Accepted3ms3784 KiB
12Accepted3ms3752 KiB
13Accepted3ms3780 KiB
subtask420/20
14Accepted3ms4124 KiB
15Accepted3ms4120 KiB
16Accepted3ms4304 KiB
17Accepted4ms4592 KiB
18Accepted4ms5060 KiB
19Accepted6ms5492 KiB
20Accepted6ms6240 KiB