# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
541331 | AlperenT | Sifra (COCI21_sifra) | C++17 | 1 ms | 320 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>
using namespace std;
string str;
vector<int> v;
set<int> st;
int main(){
ios_base::sync_with_stdio(false);cin.tie(NULL);
cin >> str;
v.push_back(0);
for(auto c : str){
if(isdigit(c)) v.back() = v.back() * 10 + (c - '0');
else if(v.back() != 0) v.push_back(0);
}
if(v.back() == 0) v.pop_back();
for(auto i : v) st.insert(i);
cout << st.size();
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |