Submission #475111

#TimeUsernameProblemLanguageResultExecution timeMemory
475111Ahmed_SolymanSifra (COCI21_sifra)C++14
50 / 50
1 ms204 KiB
#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 (stderr)

Main.cpp: In function 'int main()':
Main.cpp:17:17: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |     for(ll i=0;i<s.size();i++){
      |                ~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...