| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 375123 | AdiZer0 | Sifra (COCI21_sifra) | C++17 | 1 ms | 364 KiB | 
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define pb push_back
#define whole(x) x.begin(), x.end()
#define sz(x) (int)x.size()
using namespace std;
typedef long long ll;
typedef long double ld;
const int N = (int)2e6 + 8;
const int INF = (int)1e9 + 7;
const ll linf = (ll)1e15 + 2;
map<string, bool> was;
int cnt;
string cur;
 
void upd() { 
    if (!cur.empty()) { 
        if (!was[cur]) ++cnt, was[cur] = 1;
        cur = "";
    }
}
int main() { 
    string s; cin >> s;
    int n = sz(s);
    for (int i = 0; i < n; ++i) { 
        if ('a' <= s[i] && s[i] <= 'z') { 
            if (!cur.empty()) upd();
            continue;
        }
        if (sz(cur) == 3) upd();
        cur += s[i];
    }
    upd();
    cout << cnt << "\n";
    return 0;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
