Submission #782674

# Submission time Handle Problem Language Result Execution time Memory
782674 2023-07-14T07:23:33 Z 1075508020060209tc Sifra (COCI21_sifra) C++14
0 / 50
0 ms 212 KB
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define X first
#define Y second
int s;

signed main(){
string s;
cin>>s;
set<int>st;
for(int i=0;i<s.size();i++){
    int v=0;
    int t=i;
    while(i<s.size()&&isdigit(s[i])){
        v=v*10+s[i]-'0';i++;
    }i=t;
    if(v){
    st.insert(v);}
}
cout<<st.size();

}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:12:14: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   12 | for(int i=0;i<s.size();i++){
      |             ~^~~~~~~~~
Main.cpp:15:12: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   15 |     while(i<s.size()&&isdigit(s[i])){
      |           ~^~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Incorrect 0 ms 212 KB Output isn't correct
4 Incorrect 0 ms 212 KB Output isn't correct
5 Incorrect 0 ms 212 KB Output isn't correct
6 Incorrect 0 ms 212 KB Output isn't correct
7 Incorrect 0 ms 212 KB Output isn't correct
8 Incorrect 0 ms 212 KB Output isn't correct
9 Incorrect 0 ms 212 KB Output isn't correct
10 Incorrect 0 ms 212 KB Output isn't correct