Submission #782671

# Submission time Handle Problem Language Result Execution time Memory
782671 2023-07-14T07:21:51 Z 1075508020060209tc Sifra (COCI21_sifra) C++14
0 / 50
1000 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;
    while(i<s.size()&&isdigit(s[i])){
        v=v*10+s[i]-'0';i++;
    }i--;
    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:14: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]
   14 |     while(i<s.size()&&isdigit(s[i])){
      |           ~^~~~~~~~~
# Verdict Execution time Memory Grader output
1 Execution timed out 1085 ms 212 KB Time limit exceeded
2 Execution timed out 1057 ms 212 KB Time limit exceeded
3 Execution timed out 1080 ms 212 KB Time limit exceeded
4 Execution timed out 1081 ms 212 KB Time limit exceeded
5 Execution timed out 1077 ms 212 KB Time limit exceeded
6 Execution timed out 1046 ms 212 KB Time limit exceeded
7 Execution timed out 1070 ms 212 KB Time limit exceeded
8 Execution timed out 1077 ms 212 KB Time limit exceeded
9 Execution timed out 1077 ms 212 KB Time limit exceeded
10 Execution timed out 1080 ms 212 KB Time limit exceeded