# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
475111 | 2021-09-21T08:11:36 Z | Ahmed_Solyman | Sifra (COCI21_sifra) | C++14 | 1 ms | 204 KB |
#include <bits/stdc++.h> using namespace std; typedef long long ll; bool isNum(char c){ return (c>='0' && c<='9'); } int main() { string s;cin>>s; string t=""; s+='a'; bool b=0; set<string>st; for(ll i=0;i<s.size();i++){ if(isNum(s[i]))t+=s[i],b=1; else if(b){ b=0; st.insert(t); t=""; } } cout<<st.size()<<endl; return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 1 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Correct | 0 ms | 204 KB | Output is correct |
7 | Correct | 0 ms | 204 KB | Output is correct |
8 | Correct | 0 ms | 204 KB | Output is correct |
9 | Correct | 1 ms | 204 KB | Output is correct |
10 | Correct | 0 ms | 204 KB | Output is correct |