# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
475108 | 2021-09-21T08:09:22 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>='1' && 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
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Incorrect | 0 ms | 204 KB | Output isn't correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Correct | 1 ms | 204 KB | Output is correct |
7 | Incorrect | 1 ms | 204 KB | Output isn't correct |
8 | Incorrect | 1 ms | 204 KB | Output isn't correct |
9 | Correct | 0 ms | 204 KB | Output is correct |
10 | Incorrect | 0 ms | 204 KB | Output isn't correct |