62682023-11-10 20:29:19horkaKvázi-Izogramcpp17Runtime error 80/1004ms4368 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;*/
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1812 KiB
2Accepted3ms2004 KiB
subtask230/30
3Accepted3ms2260 KiB
4Accepted3ms2464 KiB
5Accepted3ms2676 KiB
6Accepted3ms2884 KiB
7Accepted4ms3032 KiB
subtask350/50
8Accepted3ms3220 KiB
9Accepted3ms3428 KiB
10Accepted3ms3480 KiB
11Accepted3ms3604 KiB
12Accepted3ms3708 KiB
13Accepted3ms3916 KiB
subtask40/20
14Runtime error3ms3972 KiB
15Runtime error3ms3856 KiB
16Runtime error3ms3856 KiB
17Runtime error3ms3988 KiB
18Runtime error3ms4132 KiB
19Runtime error3ms4112 KiB
20Runtime error3ms4368 KiB