Submission #404014

# Submission time Handle Problem Language Result Execution time Memory
404014 2021-05-13T16:59:30 Z ScarletS Sifra (COCI21_sifra) C++17
50 / 50
1 ms 312 KB
#include <bits/stdc++.h>
#define sz(x) (int)(x).size()
using namespace std;

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    string t,u="";
    cin>>t;
    set<string> s;
    s.insert("");
    for (int i=0;i<sz(t);++i)
    {
        if ('0'<=t[i]&&t[i]<='9')
            u+=t[i];
        else
        {
            s.insert(u);
            u="";
        }
    }
    s.insert(u);
    cout<<sz(s)-1;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 1 ms 204 KB Output is correct
9 Correct 1 ms 312 KB Output is correct
10 Correct 1 ms 204 KB Output is correct